diff options
author | dana <dana@dana.is> | 2018-06-25 16:02:02 -0500 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2018-06-25 17:02:02 -0400 |
commit | ac90316e359d41520f4f0c445286f3abda59db80 (patch) | |
tree | e2854bfb6a87d96e8fc53b89e9851d4fe7f067a3 /src | |
parent | a6467f880aee7bfaeb57f81feba2b57f8f117854 (diff) |
ripgrep: add --fixed-strings flag
Fixes #964
PR #965
Diffstat (limited to 'src')
-rw-r--r-- | src/app.rs | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -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); } |