ripgrep icon indicating copy to clipboard operation
ripgrep copied to clipboard

New option: Stop on non-match after a match

Open edoardopirovano opened this issue 4 years ago • 2 comments

Closes https://github.com/BurntSushi/ripgrep/issues/1790

This implements the option suggested in the linked issue. In particular, it adds a --stop-on-nonmatch flag that will stop reading a file once a non-matching line is found after a matching one. This is useful if, for example, a sorted file is being searched and the pattern being matched on is at the start of the line (so it is expected all matches will be adjacent).

edoardopirovano avatar Jul 08 '21 08:07 edoardopirovano

Hi @BurntSushi! No particular rush, but just checking you've seen this PR? Let me know if there's any changes you'd like me to make 🙂

edoardopirovano avatar Aug 17 '21 11:08 edoardopirovano

No, I haven't looked at it yet. Unfortunately, my time is very limited and I tend to do PR reviews in batches in order to minimize context switching. It might be a while.

BurntSushi avatar Aug 17 '21 11:08 BurntSushi