diff options
Diffstat (limited to 'manual/src/grep.md')
-rw-r--r-- | manual/src/grep.md | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/manual/src/grep.md b/manual/src/grep.md new file mode 100644 index 00000000..00d4ce70 --- /dev/null +++ b/manual/src/grep.md @@ -0,0 +1,8 @@ +# Grep + +Delta applies syntax-highlighting and other enhancements to standard grep output such as from `git grep`, [ripgrep](https://github.com/BurntSushi/ripgrep/) (aka `rg`), grep, etc. +To use with `git grep`, set delta as the pager for `grep` in the `[pager]` section of your gitconfig. See the example at the [top of the page](#get-started). +Output from other grep tools can be piped to delta: e.g. `rg -Hn --color=always`, `grep -Hn --color=always`, etc. +To customize the colors and syntax highlighting, see `grep-match-line-style`, `grep-match-word-style`, `grep-contexct-line-style`, `grep-file-style`, `grep-line-number-style`. +Ripgrep's `rg --json` output format is supported; this avoids certain file name parsing ambiguities that are inevitable with the standard grep output formats. +Note that `git grep` can display the "function context" for matches and that delta handles this output specially: see the `-p` and `-W` options of `git grep`. |