Add '-d' for '--diff'

This commit is contained in:
sharkdp 2020-04-24 16:06:59 +02:00 committed by David Peter
parent 23afc8e90c
commit 989109145a
2 changed files with 2 additions and 1 deletions

View File

@ -3,7 +3,7 @@
## Features ## 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 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 context can be controlled with `--diff-context=N`. See #23 and #940

View File

@ -108,6 +108,7 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
.arg( .arg(
Arg::with_name("diff") Arg::with_name("diff")
.long("diff") .long("diff")
.short("d")
.help("Only show lines that have been added/removed/modified.") .help("Only show lines that have been added/removed/modified.")
.long_help( .long_help(
"Only show lines that have been added/removed/modified with respect \ "Only show lines that have been added/removed/modified with respect \