diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -131,7 +131,18 @@ highlighting: git show v0.6.0:src/main.rs | bat -l rs ``` -Note that syntax highlighting within diffs is currently not supported. If you are looking for this, check out [`delta`](https://github.com/dandavison/delta). +#### `git diff` + +You can combine `bat` with `git diff` to view lines around code changes with proper syntax +highlighting: +```bash +batdiff() { + git diff --name-only --diff-filter=d | xargs bat --diff +} +``` +If you prefer to use this as a separate tool, check out `batdiff` in [`bat-extras`](https://github.com/eth-p/bat-extras). + +If you are looking for more support for git and diff operations, check out [`delta`](https://github.com/dandavison/delta). #### `xclip` @@ -665,6 +676,10 @@ bash assets/create.sh cargo install --path . --locked --force ``` +## Contributing + +Take a look at the [`CONTRIBUTING.md`](CONTRIBUTING.md) guide. + ## Maintainers - [sharkdp](https://github.com/sharkdp) |