Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
ca265276
Unverified
Commit
ca265276
authored
Apr 01, 2021
by
András Svraka
Committed by
Marc Cornellà
Dec 28, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(ripgrep): update ripgrep completions (#9775)
Closes #9775
parent
79cf2a0d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
5 deletions
+31
-5
README.md
plugins/ripgrep/README.md
+2
-2
_ripgrep
plugins/ripgrep/_ripgrep
+29
-3
No files found.
plugins/ripgrep/README.md
View file @
ca265276
...
...
@@ -8,6 +8,6 @@ To use it, add `ripgrep` to the plugins array in your zshrc file:
plugins
=(
... ripgrep
)
```
Completion is taken from the ripgrep release
[
`1
1.0.2`
](
https://github.com/BurntSushi/ripgrep/releases/tag/11.0.2
)
.
Completion is taken from the ripgrep release
[
`1
2.1.1`
](
https://github.com/BurntSushi/ripgrep/releases/tag/12.1.1
)
.
Updated on A
ugust 16th, 2019
.
Updated on A
pril 1st, 2021
.
plugins/ripgrep/_ripgrep
View file @
ca265276
...
...
@@ -3,7 +3,7 @@
##
# zsh completion function for ripgrep
#
# Run ci/test
_complete.sh
after building to ensure that the options supported by
# Run ci/test
-complete
after building to ensure that the options supported by
# this function stay in synch with the `rg` binary.
#
# For convenience, a completion reference guide is included at the bottom of
...
...
@@ -72,11 +72,19 @@ _rg() {
+
'(count)'
# Counting options
{
-c
,--count
}
'[only show count of matching lines for each file]'
'--count-matches[only show count of individual matches for each file]'
'--include-zero[include files with zero matches in summary]'
+
'(encoding)'
# Encoding options
{
-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'
...
...
@@ -128,6 +136,10 @@ _rg() {
'--ignore-file-case-insensitive[process ignore files case insensitively]'
$no
'--no-ignore-file-case-insensitive[process ignore files case sensitively]'
+
'(ignore-exclude)'
# Local exclude (ignore)-file options
"--no-ignore-exclude[don't respect local exclude (ignore) files]"
$no
'--ignore-exclude[respect local exclude (ignore) files]'
+
'(ignore-global)'
# Global ignore-file options
"--no-ignore-global[don't respect global ignore files]"
$no
'--ignore-global[respect global ignore files]'
...
...
@@ -140,10 +152,18 @@ _rg() {
"--no-ignore-vcs[don't respect version control ignore files]"
$no
'--ignore-vcs[respect version control ignore files]'
+
'(ignore-dot)'
# .ignore-file options
+
'(require-git)'
# git specific settings
"--no-require-git[don't require git repository to respect gitignore rules]"
$no
'--require-git[require git repository to respect gitignore rules]'
+
'(ignore-dot)'
# .ignore options
"--no-ignore-dot[don't respect .ignore files]"
$no
'--ignore-dot[respect .ignore files]'
+
'(ignore-files)'
# custom global ignore file options
"--no-ignore-files[don't respect --ignore-file flags]"
$no
'--ignore-files[respect --ignore-file files]'
+
'(json)'
# JSON options
'--json[output results in JSON Lines format]'
$no
"--no-json[don't output results in JSON Lines format]"
...
...
@@ -263,6 +283,10 @@ _rg() {
{
-w
,--word-regexp
}
'[only show matches surrounded by word boundaries]'
{
-x
,--line-regexp
}
'[only show matches surrounded by line boundaries]'
+
'(unicode)'
# Unicode options
$no
'--unicode[enable Unicode mode]'
'--no-unicode[disable Unicode mode]'
+
'(zip)'
# Compression options
'(--pre)'
{
-z
,--search-zip
}
'[search in compressed files]'
$no
"--no-search-zip[don't search in compressed files]"
...
...
@@ -277,7 +301,9 @@ _rg() {
))'
'*--colors=[specify color and style settings]: :->colorspec'
'--context-separator=[specify string used to separate non-continuous context lines in output]:separator'
$no
"--no-context-separator[don't print context separators]"
'--debug[show debug messages]'
'--trace[show more verbose debug messages]'
'--dfa-size-limit=[specify upper size limit of generated DFA]:DFA size (bytes)'
"(1 stats)--files[show each file that would be searched (but don't search)]"
'*--ignore-file=[specify additional ignore file]:ignore file:_files'
...
...
@@ -297,7 +323,7 @@ _rg() {
'(--type-list)*: :_files'
)
# This is used with test
_complete.sh
to verify that there are no options
# This is used with test
-complete
to verify that there are no options
# listed in the help output that aren't also defined here
[[
$_RG_COMPLETE_LIST_ARGS
==
(
1|t
*
|y
*
)
]]
&&
{
print
-rl
-
$args
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment