Commit Graph

12 Commits

Author SHA1 Message Date
Dan Davison 67df50c8a8 Refactor: parse command line 2021-11-29 08:41:24 -05:00
Thomas Otto 1c9be71dd9 Test sibling process detection 2021-11-29 08:39:56 -05:00
Thomas Otto 46b0c0441a Match process binary case insensitively 2021-11-29 08:39:56 -05:00
Thomas Otto b34a031122 Clean up FakeParentArgs
Can fake once, for_scope, or with a given list.
2021-11-29 08:39:56 -05:00
Dan Davison 8ff50afccb Do not recognize grep tools whose output we cannot currently parse
Ref #794
2021-11-24 13:06:38 -05:00
Dan Davison d000e40e61 Syntax-highlight git show $revision:./path/to/file.ext output 2021-11-22 13:18:15 -05:00
Dan Davison 07892bc572 Handle grep output
- Handle standard filepath:code and filepath:line_number:code output
  as produced by `git grep`, `rg -H`, `grep -H`, etc (with -n for line
  numbers).

- Retain the match highlighting as produced by the grep tool, and
  expose it in delta's color output styled with grep-match-style.
  (Note that --color=always is needed to retain the color if piping
  into delta, but not for `git grep` when delta is configured as git's
  pager)

- Special handling of -p, and -W options of `git grep`: these display
  the function context in which the matches occur.

- `navigate` keybindings jump between match function contexts under
  `git grep -p` and between matching lines under `git grep -W`.

Thanks @zachriggle for the proposal.
Fixes #769
2021-11-22 13:18:15 -05:00
Dan Davison ce6258d1b8 Obtain parent git grep command line options 2021-11-22 13:18:15 -05:00
Thomas Otto 0a0a3e02ad Enable faking extract_args() parameters from process utils (#783)
The fake value is valid for exactly one call, the state for
this is stored per-thread.
2021-11-21 19:36:15 -05:00
Thomas Otto 57325f98dc Add ProcessInterface 2021-11-18 12:23:12 -05:00
Thomas Otto 416563503d Make process utils more generic 2021-11-18 12:23:12 -05:00
Dan Davison 45c802528a Refactor: utils module 2021-11-15 21:03:10 -05:00