tre
tre copied to clipboard
Add the m option (from grep).
I wanted to stop agrep after N matches, so I add a -m option as close as possible to that of the GNU grep.
I'm sharing this in the hope that it will be useful to someone else.
Note: When using -m combined with the -B option, agrep will look for the N-best candidates.
This looks reasonable, but I want to test it offline first and it will be a week or two before I can do that. Thanks for this (in advance)!
Bonjour @dag-erling,
Thank you very much for your review. I added that option quickly for a use case. But to be honest, it was a single-use and quite a long time ago so I forgot about the details, I am very sorry for that m(_ _)m
Anyway, your PR is surely more thoughtful so you can ignore this one!
Have a nice day,
merged #110 instead