diff options
author | Balaji Sivaraman <balaji@balajisivaraman.com> | 2018-02-20 21:03:07 +0530 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2018-03-10 10:38:25 -0500 |
commit | 27fc9f2fd341bd3ed672f79d43bf983514188b96 (patch) | |
tree | 6a0d42ebe069ac6077eace1968332246ab51cb77 /complete | |
parent | 96f73293c0b734d91b55ad1e6940da0f706eed65 (diff) |
search: add a --count-matches flag
This commit introduces a new flag, --count-matches, which will cause
ripgrep to report a total count of all matches instead of a count of
total lines matched.
Closes #566, Closes #814
Diffstat (limited to 'complete')
-rw-r--r-- | complete/_rg | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/complete/_rg b/complete/_rg index 0659c820..a0572f94 100644 --- a/complete/_rg +++ b/complete/_rg @@ -27,7 +27,8 @@ _rg() { '(-A -B -C --after-context --before-context --context)'{-C+,--context=}'[specify lines to show before and after each match]:number of lines' '(-b --byte-offset)'{-b,--byte-offset}'[print the 0-based byte offset for each matching line]' '--context-separator=[specify string used to separate non-continuous context lines in output]:separator' - '(-c --count --passthrough --passthru)'{-c,--count}'[only show count of matches for each file]' + '(-c --count --count-matches --passthrough --passthru)'{-c,--count}'[only show count of matching lines for each file]' + '(--count-matches -c --count --passthrough --passthru)--count-matches[only show count of individual matches for each file]' '--debug[show debug messages]' '--dfa-size-limit=[specify upper size limit of generated DFA]:DFA size' '(-E --encoding)'{-E+,--encoding=}'[specify text encoding of files to search]: :_rg_encodings' |