From 27fc9f2fd341bd3ed672f79d43bf983514188b96 Mon Sep 17 00:00:00 2001 From: Balaji Sivaraman Date: Tue, 20 Feb 2018 21:03:07 +0530 Subject: 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 --- complete/_rg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'complete') 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' -- cgit v1.2.3