From: Paul Eggert Date: Wed, 15 Sep 2010 17:55:19 +0000 (-0700) Subject: zgrep: fix parsing of -Eh options X-Git-Tag: v1.5~62 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=cc1c692e4cf115ece8391aaa5f45041065a0c64a;p=debian%2Fgzip zgrep: fix parsing of -Eh options * zgrep.in: Update list of single-letter options to match what's in GNU grep. Add -h as an alias for --no-filename. Bug reported by Vladimir Sidorenko in . --- diff --git a/zgrep.in b/zgrep.in index 5d9e6d1..6dec3a9 100644 --- a/zgrep.in +++ b/zgrep.in @@ -64,13 +64,13 @@ while test $# -ne 0; do optarg= case $option in - (-[0123456789abcdhHiIKLlnoqrRsTuUvVwxyzZ]?*) + (-[0123456789EFGHIKLPRTUVZabchilnoqrsuvwxyz]?*) arg2=-\'$(expr "X${option}X" : 'X-.[0-9]*\(.*\)' | sed "$escape") eval "set -- $arg2 "'${1+"$@"}' option=$(expr "X$option" : 'X\(-.[0-9]*\)');; (--binary-*=* | --[lm]a*=* | --reg*=*) ;; - (-[ABCDefm] | --binary-* | --file | --[lm]a* | --reg*) + (-[ABCDXdefm] | binary-* | --file | --[lm]a* | --reg*) case ${1?"$option option requires an argument"} in (*\'*) optarg=" '"$(printf '%sX\n' "$1" | sed "$escape");; @@ -138,7 +138,7 @@ while test $# -ne 0; do files_with_matches=1;; (-L | --files-witho*) files_without_matches=1;; - (--no-f*) + (-h | --no-f*) no_filename=1;; (-V | --v | --ve | --ver | --vers | --versi | --versio | --version) echo "$version" || exit 2