2217a7c803f0db15e1d5d8465854e0277d4ca200

Author
Jonathan Klimt <jonathan.klimt@rwth-aachen.de>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

ripgrep: update completion to latest version (#8083)

Diff

This diff is truncated to protect this page.

  1diff --git a/plugins/ripgrep/README.md b/plugins/ripgrep/README.md
  2index 794b105eef107d71855a4d3a906c8fd7970cb301..937f73c81521d99871205833898b987dff1adb2c 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 [`0.10.0`](https://github.com/BurntSushi/ripgrep/releases/tag/0.10.0).
 10+Completion is taken from the ripgrep release [`11.0.2`](https://github.com/BurntSushi/ripgrep/releases/tag/11.0.2).
 11 
 12-Updated on September 27th, 2018.
 13+Updated on August 16th, 2019.
 14diff --git a/plugins/ripgrep/_ripgrep b/plugins/ripgrep/_ripgrep
 15index 53f135dde9fda080dee3766e05a7ffb974d885ce..d7dcfd64a872bdd5253848d1ed05641f97f86d2d 100644
 16--- a/plugins/ripgrep/_ripgrep
 17+++ b/plugins/ripgrep/_ripgrep
 18@@ -3,6 +3,12 @@
 19 ##
 20 # zsh completion function for ripgrep
 21 #
 22+# Run ci/test_complete.sh after building to ensure that the options supported by
 23+# this function stay in synch with the `rg` binary.
 24+#
 25+# For convenience, a completion reference guide is included at the bottom of
 26+# this file.
 27+#
 28 # Originally based on code from the zsh-users project — see copyright notice
 29 # below.
 30 
 31@@ -37,6 +43,7 @@ _rg() {
 32     + '(exclusive)' # Misc. fully exclusive options
 33     '(: * -)'{-h,--help}'[display help information]'
 34     '(: * -)'{-V,--version}'[display version information]'
 35+    '(: * -)'--pcre2-version'[print the version of PCRE2 used by ripgrep, if available]'
 36 
 37     + '(buffered)' # buffering options
 38     '--line-buffered[force line buffering]'
 39@@ -79,7 +86,7 @@ _rg() {
 40 
 41     + '(file-name)' # File-name options
 42     {-H,--with-filename}'[show file name for matches]'
 43-    "--no-filename[don't show file name for matches]"
 44+    {-I,--no-filename}"[don't show file name for matches]"
 45 
 46     + '(file-system)' # File system options
 47     "--one-file-system[don't descend into directories on other file systems]"
 48@@ -97,6 +104,10 @@ _rg() {
 49     '*'{-g+,--glob=}'[include/exclude files matching specified glob]:glob'
 50     '*--iglob=[include/exclude files matching specified case-insensitive glob]:glob'
 51 
 52+    + '(glob-case-insensitive)' # File-glob case sensitivity options
 53+    '--glob-case-insensitive[treat -g/--glob patterns case insensitively]'
 54+    $no'--no-glob-case-insensitive[treat -g/--glob patterns case sensitively]'
 55+
 56     + '(heading)' # Heading options
 57     '(pretty-vimgrep)--heading[show matches grouped by file name]'
 58     "(pretty-vimgrep)--no-heading[don't show matches grouped by file name]"
 59@@ -105,9 +116,17 @@ _rg() {
 60     '--hidden[search hidden files and directories]'
 61     $no"--no-hidden[don't search hidden files and directories]"
 62 
 63+    + '(hybrid)' # hybrid regex options
 64+    '--auto-hybrid-regex[dynamically use PCRE2 if necessary]'
 65+    $no"--no-auto-hybrid-regex[don't dynamically use PCRE2 if necessary]"
 66+
 67     + '(ignore)' # Ignore-file options
 68-    "(--no-ignore-global --no-ignore-parent --no-ignore-vcs)--no-ignore[don't respect ignore files]"
 69-    $no'(--ignore-global --ignore-parent --ignore-vcs)--ignore[respect ignore files]'
 70+    "(--no-ignore-global --no-ignore-parent --no-ignore-vcs --no-ignore-dot)--no-ignore[don't respect ignore files]"
 71+    $no'(--ignore-global --ignore-parent --ignore-vcs --ignore-dot)--ignore[respect ignore files]'
 72+
 73+    + '(ignore-file-case-insensitive)' # Ignore-file case sensitivity options
 74+    '--ignore-file-case-insensitive[process ignore files case insensitively]'
 75+    $no'--no-ignore-file-case-insensitive[process ignore files case sensitively]'
 76 
 77     + '(ignore-global)' # Global ignore-file options
 78     "--no-ignore-global[don't respect global ignore files]"
 79@@ -121,6 +140,10 @@ _rg() {
 80     "--no-ignore-vcs[don't respect version control ignore files]"
 81     $no'--ignore-vcs[respect version control ignore files]'
 82 
 83+    + '(ignore-dot)' # .ignore-file options
 84+    "--no-ignore-dot[don't respect .ignore files]"
 85+    $no'--ignore-dot[respect .ignore files]'
 86+
 87     + '(json)' # JSON options
 88     '--json[output results in JSON Lines format]'
 89     $no"--no-json[don't output results in JSON Lines format]"
 90@@ -134,6 +157,10 @@ _rg() {
 91     $no"--no-crlf[don't use CRLF as line terminator]"
 92     '(text)--null-data[use NUL as line terminator]'
 93 
 94+    + '(max-columns-preview)' # max column preview options
 95+    '--max-columns-preview[show preview for long lines (with -M)]'
 96+    $no"--no-max-columns-preview[don't show preview for long lines (with -M)]"
 97+
 98     + '(max-depth)' # Directory-depth options
 99     '--max-depth=[specify max number of directories to descend]:number of directories'
100     '!--maxdepth=:number of directories'
101@@ -213,6 +240,8 @@ _rg() {
102 
103     + '(text)' # Binary-search options
104     {-a,--text}'[search binary files as if they were text]'
105+    "--binary[search binary files, don't print binary data]"
106+    $no"--no-binary[don't search binary files]"
107     $no"(--null-data)--no-text[don't search binary files as if they were text]"
108 
109     + '(threads)' # Thread-count options
110@@ -364,7 +393,7 @@ _rg_encodings() {
111     shift{-,_}jis csshiftjis {,x-}sjis ms_kanji ms932
112     utf{,-}8 utf-16{,be,le} unicode-1-1-utf-8
113     windows-{31j,874,949,125{0..8}} dos-874 tis-620 ansi_x3.4-1968
114-    x-user-defined auto
115+    x-user-defined auto none
116   )
117