In the process of building the Debian gzip 1.6-1 package, I folded in a patch from one of our users that improves the zgrep man page to not lie about passing all options to grep. This seems like something you'd probably like to merge.
See http://bugs.debian.org/687123 for more details. Bdale --- a/zgrep.1 2012-09-10 03:20:56.541637782 +0300 +++ b/zgrep.1 2012-09-10 03:18:21.000000000 +0300 @@ -11,7 +11,13 @@ zgrep \- search possibly compressed file invokes .I grep on compressed or gzipped files. -All options specified are passed directly to +These +.I grep +options will cause +.I zgrep +to terminate with an error code: +.BI (-[drRzZ] | --di* | --exc* | --inc* | --rec* | --nu*) . +All other options specified are passed directly to .IR grep . If no file is specified, then the standard input is decompressed if necessary and fed to grep. @@ -23,6 +29,8 @@ If the GREP environment variable is set, uses it as the .I grep program to be invoked. +.SH EXIT CODE +2 - An option that is not supported was specified. .SH AUTHOR Charles Levert (char...@comm.polymtl.ca) .SH "SEE ALSO"
pgpT6peUFjuUM.pgp
Description: PGP signature