09a3eb69bbd16198fc4eb4f89b216f232ba15460
- Author
- Marc Cornellà <marc@mcornella.com>
- Committer
- Marc Cornellà <marc@mcornella.com>
- Date
Message
Diff
This diff is truncated to protect this page.
1diff --git a/plugins/ripgrep/README.md b/plugins/ripgrep/README.md
2deleted file mode 100644
3index ab9d041166656cc94500e0d622d595073d47584d..0000000000000000000000000000000000000000
4--- a/plugins/ripgrep/README.md
5+++ /dev/null
6@@ -1,9 +0,0 @@
7-# ripgrep
8-
9-This plugin adds completion for the text search tool [`ripgrep`](https://github.com/BurntSushi/ripgrep), also known as `rg`.
10-
11-To use it, add `ripgrep` to the plugins array in your zshrc file:
12-
13-```zsh
14-plugins=(... ripgrep)
15-```
16diff --git a/plugins/ripgrep/_ripgrep b/plugins/ripgrep/_ripgrep
17deleted file mode 100644
18index a93a8b8ebfe7aa1884189b37f7fd9a43e10fc772..0000000000000000000000000000000000000000
19--- a/plugins/ripgrep/_ripgrep
20+++ /dev/null
21@@ -1,640 +0,0 @@
22-#compdef rg
23-
24-##
25-# zsh completion function for ripgrep
26-#
27-# Run ci/test-complete after building to ensure that the options supported by
28-# this function stay in synch with the `rg` binary.
29-#
30-# For convenience, a completion reference guide is included at the bottom of
31-# this file.
32-#
33-# Originally based on code from the zsh-users project — see copyright notice
34-# below.
35-
36-_rg() {
37- local curcontext=$curcontext no='!' descr ret=1
38- local -a context line state state_descr args tmp suf
39- local -A opt_args
40-
41- # ripgrep has many options which negate the effect of a more common one — for
42- # example, `--no-column` to negate `--column`, and `--messages` to negate
43- # `--no-messages`. There are so many of these, and they're so infrequently
44- # used, that some users will probably find it irritating if they're completed
45- # indiscriminately, so let's not do that unless either the current prefix
46- # matches one of those negation options or the user has the `complete-all`
47- # style set. Note that this prefix check has to be updated manually to account
48- # for all of the potential negation options listed below!
49- if
50- # We also want to list all of these options during testing
51- [[ $_RG_COMPLETE_LIST_ARGS == (1|t*|y*) ]] ||
52- # (--[imnp]* => --ignore*, --messages, --no-*, --pcre2-unicode)
53- [[ $PREFIX$SUFFIX == --[imnp]* ]] ||
54- zstyle -t ":complete:$curcontext:*" complete-all
55- then
56- no=
57- fi
58-
59- # We make heavy use of argument groups here to prevent the option specs from
60- # growing unwieldy. These aren't supported in zsh <5.4, though, so we'll strip
61- # them out below if necessary. This makes the exclusions inaccurate on those
62- # older versions, but oh well — it's not that big a deal
63- args=(
64- + '(exclusive)' # Misc. fully exclusive options
65- '(: * -)'{-h,--help}'[display help information]'
66- '(: * -)'{-V,--version}'[display version information]'
67- '(: * -)'--pcre2-version'[print the version of PCRE2 used by ripgrep, if available]'
68-
69- + '(buffered)' # buffering options
70- '--line-buffered[force line buffering]'
71- $no"--no-line-buffered[don't force line buffering]"
72- '--block-buffered[force block buffering]'
73- $no"--no-block-buffered[don't force block buffering]"
74-
75- + '(case)' # Case-sensitivity options
76- {-i,--ignore-case}'[search case-insensitively]'
77- {-s,--case-sensitive}'[search case-sensitively]'
78- {-S,--smart-case}'[search case-insensitively if pattern is all lowercase]'
79-
80- + '(context-a)' # Context (after) options
81- '(context-c)'{-A+,--after-context=}'[specify lines to show after each match]:number of lines'
82-
83- + '(context-b)' # Context (before) options
84- '(context-c)'{-B+,--before-context=}'[specify lines to show before each match]:number of lines'
85-
86- + '(context-c)' # Context (combined) options
87- '(context-a context-b)'{-C+,--context=}'[specify lines to show before and after each match]:number of lines'
88-
89- + '(column)' # Column options
90- '--column[show column numbers for matches]'
91- $no"--no-column[don't show column numbers for matches]"
92-
93- + '(count)' # Counting options
94- {-c,--count}'[only show count of matching lines for each file]'
95- '--count-matches[only show count of individual matches for each file]'
96- '--include-zero[include files with zero matches in summary]'
97-
98- + '(encoding)' # Encoding options
99- {-E+,--encoding=}'[specify text encoding of files to search]: :_rg_encodings'
100- $no'--no-encoding[use default text encoding]'
101-
102- + '(engine)' # Engine choice options
103- '--engine=[select which regex engine to use]:when:((
104- default\:"use default engine"
105- pcre2\:"identical to --pcre2"
106- auto\:"identical to --auto-hybrid-regex"
107- ))'
108-
109- + file # File-input options
110- '(1)*'{-f+,--file=}'[specify file containing patterns to search for]: :_files'
111-
112- + '(file-match)' # Files with/without match options
113- '(stats)'{-l,--files-with-matches}'[only show names of files with matches]'
114- '(stats)--files-without-match[only show names of files without matches]'
115-
116- + '(file-name)' # File-name options
117- {-H,--with-filename}'[show file name for matches]'
118- {-I,--no-filename}"[don't show file name for matches]"
119-
120- + '(file-system)' # File system options