summaryrefslogtreecommitdiffstats
path: root/complete
diff options
context:
space:
mode:
authorBalaji Sivaraman <balaji@balajisivaraman.com>2018-02-12 22:47:22 +0530
committerAndrew Gallant <jamslam@gmail.com>2018-03-10 10:59:00 -0500
commit00520b30f5f38e543e17b1a4cc5e8417bc488ea4 (patch)
tree154aee40835b6a0d2fe945ccc065ff3ee0b8d8c0 /complete
parent11a8f0eaf0f661c5b20c20fa2399314905d84fc1 (diff)
output: add --stats flag
This commit provides basic support for a --stats flag, which will print various aggregate statistics about a search after all of the results have been printed. This is mostly intended to support a similar feature found in the Silver Searcher. Note though that we don't emit the total bytes searched; this is a first pass at an implementation and we can improve upon it later. Closes #411, Closes #799
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 a0572f94..6002beb1 100644
--- a/complete/_rg
+++ b/complete/_rg
@@ -91,6 +91,7 @@ _rg() {
'(-e -f --file --files --regexp --type-list)1: :_rg_pattern'
'(--type-list)*:file:_files'
'(-z --search-zip)'{-z,--search-zip}'[search in compressed files]'
+ "(--stats)--stats[print stats about this search]"
)
[[ ${_RG_COMPLETE_LIST_ARGS:-} == (1|t*|y*) ]] && {