summaryrefslogtreecommitdiffstats
path: root/complete
diff options
context:
space:
mode:
authorCollin Styles <collingstyles@gmail.com>2019-10-16 19:03:00 -0700
committerAndrew Gallant <jamslam@gmail.com>2020-02-17 17:16:28 -0500
commita070722ff27c7d57d47b1766de9d253fbfe5bef9 (patch)
tree1a6370a1966bc094f22ef2d61afcb9d4c1ad6d52 /complete
parent4628d778089d0bf609462af7d5b38997fd9a014f (diff)
cli: add --include-zero flag
This flag, when used in conjunction with --count or --count-matches, will print a result for each file searched even if there were zero matches in that file. This is off by default but can be enabled to make ripgrep behave more like grep. This also clarifies some of the defaults for the grep-printer::SummaryBuilder type. Closes #1370, Closes #1405
Diffstat (limited to 'complete')
-rw-r--r--complete/_rg1
1 files changed, 1 insertions, 0 deletions
diff --git a/complete/_rg b/complete/_rg
index d77ef5b6..5fa6e9c2 100644
--- a/complete/_rg
+++ b/complete/_rg
@@ -72,6 +72,7 @@ _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'