mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-05-19 09:40:22 -07:00
ripgrep: add -I as a short option for --no-filename
This flag is commonly used in pipelines and it can be annoying to write it out every time you need it. Ideally, we would use -h for this to match GNU grep, but -h is used to print help output. Closes #1185
This commit is contained in:
parent
5a565354f8
commit
601f212a0b
@ -85,7 +85,7 @@ _rg() {
|
|||||||
|
|
||||||
+ '(file-name)' # File-name options
|
+ '(file-name)' # File-name options
|
||||||
{-H,--with-filename}'[show file name for matches]'
|
{-H,--with-filename}'[show file name for matches]'
|
||||||
"--no-filename[don't show file name for matches]"
|
{-I,--no-filename}"[don't show file name for matches]"
|
||||||
|
|
||||||
+ '(file-system)' # File system options
|
+ '(file-system)' # File system options
|
||||||
"--one-file-system[don't descend into directories on other file systems]"
|
"--one-file-system[don't descend into directories on other file systems]"
|
||||||
|
@ -2473,7 +2473,7 @@ ripgrep is explicitly instructed to search one file or stdin.
|
|||||||
|
|
||||||
This flag overrides --with-filename.
|
This flag overrides --with-filename.
|
||||||
");
|
");
|
||||||
let arg = RGArg::switch("no-filename")
|
let arg = RGArg::switch("no-filename").short("I")
|
||||||
.help(NO_SHORT).long_help(NO_LONG)
|
.help(NO_SHORT).long_help(NO_LONG)
|
||||||
.overrides("with-filename");
|
.overrides("with-filename");
|
||||||
args.push(arg);
|
args.push(arg);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user