From 00520b30f5f38e543e17b1a4cc5e8417bc488ea4 Mon Sep 17 00:00:00 2001 From: Balaji Sivaraman Date: Mon, 12 Feb 2018 22:47:22 +0530 Subject: 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 --- complete/_rg | 1 + 1 file changed, 1 insertion(+) (limited to 'complete') 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*) ]] && { -- cgit v1.2.3