Add -m/--max-count flag.

This flag limits the number of matches printed *per file*.

Closes #159
This commit is contained in:
Andrew Gallant
2016-11-06 13:09:53 -05:00
parent 351eddc17e
commit 58aca2efb2
8 changed files with 128 additions and 3 deletions

View File

@@ -73,6 +73,9 @@ fn main() {
}
fn run(args: Arc<Args>) -> Result<u64> {
if args.never_match() {
return Ok(0);
}
{
let args = args.clone();
ctrlc::set_handler(move || {