ca2652769ce283ddb77807767215e19a78642c51

Author
András Svraka <svraka.andras@gmail.com>
Committer
Marc Cornellà <hello@mcornella.com>
Date

Message

feat(ripgrep): update ripgrep completions (#9775)

Closes #9775

Diff

  1diff --git a/plugins/ripgrep/README.md b/plugins/ripgrep/README.md
  2index 937f73c81521d99871205833898b987dff1adb2c..a26f458230c2076ea6eefb736a91b27e0cc508c1 100644
  3--- a/plugins/ripgrep/README.md
  4+++ b/plugins/ripgrep/README.md
  5@@ -8,6 +8,6 @@ To use it, add `ripgrep` to the plugins array in your zshrc file:
  6 plugins=(... ripgrep)
  7 ```
  8 
  9-Completion is taken from the ripgrep release [`11.0.2`](https://github.com/BurntSushi/ripgrep/releases/tag/11.0.2).
 10+Completion is taken from the ripgrep release [`12.1.1`](https://github.com/BurntSushi/ripgrep/releases/tag/12.1.1).
 11 
 12-Updated on August 16th, 2019.
 13+Updated on April 1st, 2021.
 14diff --git a/plugins/ripgrep/_ripgrep b/plugins/ripgrep/_ripgrep
 15index d7dcfd64a872bdd5253848d1ed05641f97f86d2d..828a6e601dc1e080968d289d33651b8788f42ff2 100644
 16--- a/plugins/ripgrep/_ripgrep
 17+++ b/plugins/ripgrep/_ripgrep
 18@@ -3,7 +3,7 @@
 19 ##
 20 # zsh completion function for ripgrep
 21 #
 22-# Run ci/test_complete.sh after building to ensure that the options supported by
 23+# Run ci/test-complete after building to ensure that the options supported by
 24 # this function stay in synch with the `rg` binary.
 25 #
 26 # For convenience, a completion reference guide is included at the bottom of
 27@@ -72,11 +72,19 @@ _rg() {
 28     + '(count)' # Counting options
 29     {-c,--count}'[only show count of matching lines for each file]'
 30     '--count-matches[only show count of individual matches for each file]'
 31+    '--include-zero[include files with zero matches in summary]'
 32 
 33     + '(encoding)' # Encoding options
 34     {-E+,--encoding=}'[specify text encoding of files to search]: :_rg_encodings'
 35     $no'--no-encoding[use default text encoding]'
 36 
 37+    + '(engine)' # Engine choice options
 38+    '--engine=[select which regex engine to use]:when:((
 39+      default\:"use default engine"
 40+      pcre2\:"identical to --pcre2"
 41+      auto\:"identical to --auto-hybrid-regex"
 42+    ))'
 43+
 44     + file # File-input options
 45     '(1)*'{-f+,--file=}'[specify file containing patterns to search for]: :_files'
 46 
 47@@ -128,6 +136,10 @@ _rg() {
 48     '--ignore-file-case-insensitive[process ignore files case insensitively]'
 49     $no'--no-ignore-file-case-insensitive[process ignore files case sensitively]'
 50 
 51+    + '(ignore-exclude)' # Local exclude (ignore)-file options
 52+    "--no-ignore-exclude[don't respect local exclude (ignore) files]"
 53+    $no'--ignore-exclude[respect local exclude (ignore) files]'
 54+
 55     + '(ignore-global)' # Global ignore-file options
 56     "--no-ignore-global[don't respect global ignore files]"
 57     $no'--ignore-global[respect global ignore files]'
 58@@ -140,10 +152,18 @@ _rg() {
 59     "--no-ignore-vcs[don't respect version control ignore files]"
 60     $no'--ignore-vcs[respect version control ignore files]'
 61 
 62-    + '(ignore-dot)' # .ignore-file options
 63+    + '(require-git)' # git specific settings
 64+    "--no-require-git[don't require git repository to respect gitignore rules]"
 65+    $no'--require-git[require git repository to respect gitignore rules]'
 66+
 67+    + '(ignore-dot)' # .ignore options
 68     "--no-ignore-dot[don't respect .ignore files]"
 69     $no'--ignore-dot[respect .ignore files]'
 70 
 71+    + '(ignore-files)' # custom global ignore file options
 72+    "--no-ignore-files[don't respect --ignore-file flags]"
 73+    $no'--ignore-files[respect --ignore-file files]'
 74+
 75     + '(json)' # JSON options
 76     '--json[output results in JSON Lines format]'
 77     $no"--no-json[don't output results in JSON Lines format]"
 78@@ -263,6 +283,10 @@ _rg() {
 79     {-w,--word-regexp}'[only show matches surrounded by word boundaries]'
 80     {-x,--line-regexp}'[only show matches surrounded by line boundaries]'
 81 
 82+    + '(unicode)' # Unicode options
 83+    $no'--unicode[enable Unicode mode]'
 84+    '--no-unicode[disable Unicode mode]'
 85+
 86     + '(zip)' # Compression options
 87     '(--pre)'{-z,--search-zip}'[search in compressed files]'
 88     $no"--no-search-zip[don't search in compressed files]"
 89@@ -277,7 +301,9 @@ _rg() {
 90     ))'
 91     '*--colors=[specify color and style settings]: :->colorspec'
 92     '--context-separator=[specify string used to separate non-continuous context lines in output]:separator'
 93+    $no"--no-context-separator[don't print context separators]"
 94     '--debug[show debug messages]'
 95+    '--trace[show more verbose debug messages]'
 96     '--dfa-size-limit=[specify upper size limit of generated DFA]:DFA size (bytes)'
 97     "(1 stats)--files[show each file that would be searched (but don't search)]"
 98     '*--ignore-file=[specify additional ignore file]:ignore file:_files'
 99@@ -297,7 +323,7 @@ _rg() {
100     '(--type-list)*: :_files'
101   )
102 
103-  # This is used with test_complete.sh to verify that there are no options
104+  # This is used with test-complete to verify that there are no options
105   # listed in the help output that aren't also defined here
106   [[ $_RG_COMPLETE_LIST_ARGS == (1|t*|y*) ]] && {
107     print -rl - $args