From 989109145a39ee1ce65cfe2e17c502ce2e1a673c Mon Sep 17 00:00:00 2001 From: sharkdp Date: Fri, 24 Apr 2020 16:06:59 +0200 Subject: [PATCH] Add '-d' for '--diff' --- CHANGELOG.md | 2 +- src/bin/bat/clap_app.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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 \