Skip to content

Commit

Permalink
ripgrep: add -I as a short option for --no-filename
Browse files Browse the repository at this point in the history
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
  • Loading branch information
BurntSushi committed Apr 14, 2019
1 parent b6c7e83 commit 5490d9e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion complete/_rg
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ _rg() {

+ '(file-name)' # File-name options
{-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
"--one-file-system[don't descend into directories on other file systems]"
Expand Down
2 changes: 1 addition & 1 deletion src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2473,7 +2473,7 @@ ripgrep is explicitly instructed to search one file or stdin.
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)
.overrides("with-filename");
args.push(arg);
Expand Down

0 comments on commit 5490d9e

Please sign in to comment.