summaryrefslogtreecommitdiffstats
path: root/complete
diff options
context:
space:
mode:
authorpierrenn <git@pnn.sh>2020-02-28 00:58:56 +0900
committerAndrew Gallant <jamslam@gmail.com>2020-03-15 09:30:58 -0400
commit3a6a24a52ad43d55554240b43e8be989c78e4efe (patch)
treecc9ec1892cf446010327f87bb5a3494a81c2e5cb /complete
parentaab3d80374d5ba4a926d2928ccd476f99846b312 (diff)
cli: add engine flag
This permits switching between the different regex engine modes that ripgrep supports. The purpose of this flag is to make it easier to extend ripgrep with additional regex engines. Closes #1488, Closes #1502
Diffstat (limited to 'complete')
-rw-r--r--complete/_rg7
1 files changed, 7 insertions, 0 deletions
diff --git a/complete/_rg b/complete/_rg
index 44d63e63..399647f7 100644
--- a/complete/_rg
+++ b/complete/_rg
@@ -78,6 +78,13 @@ _rg() {
{-E+,--encoding=}'[specify text encoding of files to search]: :_rg_encodings'
$no'--no-encoding[use default text encoding]'
+ + '(engine)' # Engine choice options
+ '--engine=[select which regex engine to use]:when:((
+ default\:"use default engine"
+ pcre2\:"identical to --pcre2"
+ auto\:"identical to --auto-hybrid-regex"
+ ))'
+
+ file # File-input options
'(1)*'{-f+,--file=}'[specify file containing patterns to search for]: :_files'