summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md17
1 files changed, 16 insertions, 1 deletions
diff --git a/README.md b/README.md
index b2f7e74f..f04e6a1c 100644
--- a/README.md
+++ b/README.md
@@ -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)