Closed priyadarshan closed 9 years ago
Agreed, this would be a nice feature. Ag itself has a --stats
option, but that shows how many files searched instead of how many matched (the latter is more useful I think).
I really wish I could help, perhaps submitting a patch to do that, but I am an absolute beginner in elisp. I can help testing it, though.
The --stats
option prints a summary like below:
32 matches
9576 files searched
97088546 bytes searched
1.511894 seconds
You can enable that by adding the below to your emacs init file after (require 'ag)
.
(add-to-list 'ag-arguments "--stats")
Aha, so --stats
is now much more informative.
I'm going to add --stats
to the default value of ag-arguments
. v1.0 will make this prettier, but this is a definite improvement today.
Thank you. Thanks for the good news about v1.0, too!
Would it be possible to add total matches found (possibly, in how many total files)? It could be in the
*ag search*
buffer, or, if it wouldn't be compatible with other packages (likewgrep
), just a message in the minibuffer would be all right, something like1071 matches across 363 files
.I find this feature quite useful, as it can give a quick ballpark idea if the search string was properly set, or not.
Thank you so much for
ag.el
, it is indispensable.