vrothberg/vgrep

[FR] Please add option that will print just the files for easy parsing with sed or awk

AdamSLevy opened this issue · 2 comments

I want to be able to run vgrep --files-only "hello world" | sed -i 's/hello/goodbye/g'

Because vgrep always prints the index, and search line, this is not possible.

Thanks for reaching out!

So far, vgrep runs very poorly in such a context. It's a pager so I didn't consider piping the output any further.

But I am not opposed to the idea just very short on time :) Would you consider opening a PR? A nice alternative would be using git-grep --files-with-matches ... | sed ...

Done ✔️ Added the same flag as git-grep: -l, --files-with-matches

Thanks again for reaching out!