Created attachment 204872 [details]
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
The attached patch allows to pass several options -e as one would do with standard grep(1) command.
Any volunteer to review that PR ?
(In reply to Ganael LAPLANCHE from comment #1)
Could you please create a phabricator review and tag me?
Here is the link to the review :
Thanks a lot!
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.