diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -23,6 +23,7 @@ show = delta log = delta blame = delta + grep = delta reflog = delta [interactive] @@ -64,6 +65,7 @@ Code evolves, and we all spend time studying diffs. Delta aims to make this both - [Choosing colors (styles)](#choosing-colors-styles) - [Line numbers](#line-numbers) - [Side-by-side view](#side-by-side-view) + - [Grep](#grep) - ["Features": named groups of settings](#features-named-groups-of-settings) - [Custom themes](#custom-themes) - [diff-highlight and diff-so-fancy emulation](#diff-highlight-and-diff-so-fancy-emulation) @@ -151,6 +153,7 @@ Here's what `git show` can look like with git configured to use delta: - Git style strings (foreground color, background color, font attributes) are supported for >20 stylable elements - Side-by-side view with line-wrapping - Line numbering +- Handles grep output with file paths from `rg`, `git grep`, `grep`, etc - `diff-highlight` and `diff-so-fancy` emulation modes - Stylable box/line decorations to draw attention to commit, file and hunk header sections. - Support for Git's `--color-moved` feature. @@ -410,6 +413,15 @@ In contrast, the long replacement line in the right panel overflows by almost an For control over the details of line wrapping, see `--wrap-max-lines`, `--wrap-left-symbol`, `--wrap-right-symbol`, `--wrap-right-percent`, `--wrap-right-prefix-symbol`, `--inline-hint-style`. Line wrapping was implemented by @th1000s. +### 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`. + ### "Features": named groups of settings All delta options can go under the `[delta]` section in your git config file. However, you can also use named "features" to keep things organized: these are sections in git config like `[delta "my-feature"]`. Here's an example using two custom features: |