summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsharkdp <davidpeter@web.de>2020-04-24 16:06:59 +0200
committerDavid Peter <sharkdp@users.noreply.github.com>2020-04-24 16:12:38 +0200
commit989109145a39ee1ce65cfe2e17c502ce2e1a673c (patch)
treee7ef5b4e9933939e5e368408184253e9beb1b841
parent23afc8e90c4c98c405a07c1d0bfc54a8d719852c (diff)
Add '-d' for '--diff'
-rw-r--r--CHANGELOG.md2
-rw-r--r--src/bin/bat/clap_app.rs1
2 files changed, 2 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 973eba9a..50a886da 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,7 +3,7 @@
## Features
-- Add a new `--diff` option that can be used to only show lines surrounding
+- Add a new `--diff`/`-d` option that can be used to only show lines surrounding
Git changes, i.e. added, removed or modified lines. The amount of additional
context can be controlled with `--diff-context=N`. See #23 and #940
diff --git a/src/bin/bat/clap_app.rs b/src/bin/bat/clap_app.rs
index 01a5bf3d..9377bf1d 100644
--- a/src/bin/bat/clap_app.rs
+++ b/src/bin/bat/clap_app.rs
@@ -108,6 +108,7 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
.arg(
Arg::with_name("diff")
.long("diff")
+ .short("d")
.help("Only show lines that have been added/removed/modified.")
.long_help(
"Only show lines that have been added/removed/modified with respect \