mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-06-14 22:15:13 +02:00
cli: add --stop-on-nonmatch flag
This causes ripgrep to stop searching an individual file after it has found a non-matching line. But this only occurs after it has found a matching line. Fixes #1790, Closes #1930
This commit is contained in:
committed by
Andrew Gallant
parent
4782ebd5e0
commit
6d95c130d5
@ -821,7 +821,8 @@ impl ArgMatches {
|
||||
.before_context(ctx_before)
|
||||
.after_context(ctx_after)
|
||||
.passthru(self.is_present("passthru"))
|
||||
.memory_map(self.mmap_choice(paths));
|
||||
.memory_map(self.mmap_choice(paths))
|
||||
.stop_on_nonmatch(self.is_present("stop-on-nonmatch"));
|
||||
match self.encoding()? {
|
||||
EncodingMode::Some(enc) => {
|
||||
builder.encoding(Some(enc));
|
||||
|
Reference in New Issue
Block a user