From ac90316e359d41520f4f0c445286f3abda59db80 Mon Sep 17 00:00:00 2001 From: dana Date: Mon, 25 Jun 2018 16:02:02 -0500 Subject: ripgrep: add --fixed-strings flag Fixes #964 PR #965 --- src/app.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/app.rs b/src/app.rs index 2cb2c468..94c3b599 100644 --- a/src/app.rs +++ b/src/app.rs @@ -909,9 +909,17 @@ fn flag_fixed_strings(args: &mut Vec) { 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); } -- cgit v1.2.3