piranha / goreplace

command line tool for search and replace
ISC License
185 stars 14 forks source link

[Feature request] Search context #18

Open alexwhitman opened 10 years ago

alexwhitman commented 10 years ago

I often use gr to do a quick search but sometimes it would be useful to know the context of what is found by looking at the surrounding lines. Adding something like grep's -A, -B and -C flags would be useful.

piranha commented 10 years ago

Makes sense. I'm open to pull requests, of course, but maybe I'll get my hands dirty in code next week or so. :)