summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorJesse Vermeulen <43927190+JesseVermeulen123@users.noreply.github.com>2020-10-27 17:40:40 +0100
committerDavid Peter <sharkdp@users.noreply.github.com>2020-10-29 19:22:38 +0100
commit88eba5660746e3caba334402398a66d340321ee6 (patch)
tree7772c0920b46acf21079c58263454f98235ff5d3 /README.md
parentcc6cf482563327957e09c1792e018d4862b08c5e (diff)
Add git diff example to Integration docs
Part of https://github.com/sharkdp/bat/issues/448 Thanks to https://github.com/sharkdp/bat/pull/940
Diffstat (limited to 'README.md')
-rw-r--r--README.md8
1 files changed, 7 insertions, 1 deletions
diff --git a/README.md b/README.md
index b2f7e74f..ed33b2ea 100644
--- a/README.md
+++ b/README.md
@@ -131,7 +131,13 @@ 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
+git diff --name-only --diff-filter=d | xargs bat --diff
+```
#### `xclip`