1
0
mirror of https://github.com/BurntSushi/ripgrep.git synced 2025-06-30 22:23:44 +02:00

ripgrep: stop early when --files --quiet is used

This commit tweaks the implementation of the --files flag to stop early
when --quiet is provided.

Fixes #907
This commit is contained in:
Andrew Gallant
2018-07-22 11:05:24 -04:00
parent 03af61fc7b
commit 22ac2e056e
3 changed files with 13 additions and 2 deletions

View File

@ -1402,6 +1402,9 @@ fn flag_quiet(args: &mut Vec<RGArg>) {
Do not print anything to stdout. If a match is found in a file, then ripgrep
will stop searching. This is useful when ripgrep is used only for its exit
code (which will be an error if no matches are found).
When --files is used, then ripgrep will stop finding files after finding the
first file that matches all ignore rules.
");
let arg = RGArg::switch("quiet").short("q")
.help(SHORT).long_help(LONG);