Created attachment 204872 [details] Patch Currently, zgrep only allows a single option -e to be processed : $ echo -e 'foo\nbar\nbaz' > test.txt $ gzip test.txt $ zgrep -e foo -e bar test.txt.gz zcat: can't stat: -e: No such file or directory zcat: can't stat: bar: No such file or directory test.txt.gz:foo The attached patch allows to pass several options -e as one would do with standard grep(1) command.
Hello, Any volunteer to review that PR ? Thanks :)
(In reply to Ganael LAPLANCHE from comment #1) Could you please create a phabricator review and tag me?
Hello Mark, Here is the link to the review : https://reviews.freebsd.org/D23549 Thanks a lot! Ganael.
Well, as discussed in the review, the suggested patch does not handle spaces in file names. It will probably be tricky to work around that problem in shell without using the eval statement, which would introduce security problems. So I'll close that PR for now, as it would probably be better to re-implement the zgrep wrapper in a language more suited for arguments' manipulation.