Skip to content

Commit

Permalink
ripgrep: add --fixed-strings flag
Browse files Browse the repository at this point in the history
Fixes #964

PR #965
  • Loading branch information
okdana authored and BurntSushi committed Jun 25, 2018
1 parent a6467f8 commit ac90316
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -909,9 +909,17 @@ fn flag_fixed_strings(args: &mut Vec<RGArg>) {
Treat the pattern as a literal string instead of a regular expression. When
this flag is used, special regular expression meta characters such as .(){}*+
do not need to be escaped.
This flag can be disabled with --no-fixed-strings.
");
let arg = RGArg::switch("fixed-strings").short("F")
.help(SHORT).long_help(LONG);
.help(SHORT).long_help(LONG)
.overrides("no-fixed-strings");
args.push(arg);

let arg = RGArg::switch("no-fixed-strings")
.hidden()
.overrides("fixed-strings");
args.push(arg);
}

Expand Down

0 comments on commit ac90316

Please sign in to comment.