From 598b162fea356249506f4ca5480882564fc3321e Mon Sep 17 00:00:00 2001 From: Andrew Gallant Date: Sun, 6 Nov 2016 12:10:27 -0500 Subject: [PATCH] Note -e/--regexp's additional usefulness. Specifically, it can be used when searching for patterns that start with a dash. Fixes #215 --- doc/rg.1.md | 3 ++- src/args.rs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/rg.1.md b/doc/rg.1.md index be8c250..e503673 100644 --- a/doc/rg.1.md +++ b/doc/rg.1.md @@ -35,7 +35,8 @@ the raw speed of grep. -e, --regexp *PATTERN* ... : Use PATTERN to search. This option can be provided multiple times, where all - patterns given are searched. + patterns given are searched. This is also useful when searching for patterns + that start with a dash. -F, --fixed-strings : Treat the pattern as a literal string instead of a regular expression. diff --git a/src/args.rs b/src/args.rs index 017ade4..f75f331 100644 --- a/src/args.rs +++ b/src/args.rs @@ -48,7 +48,8 @@ Common options: [default: auto] -e, --regexp PATTERN ... Use PATTERN to search. This option can be provided multiple times, where all patterns - given are searched. + given are searched. This is also useful when + searching for a pattern that starts with a dash. -F, --fixed-strings Treat the pattern as a literal string instead of a regular expression. -g, --glob GLOB ... Include or exclude files for searching that