Fix zgrep --version
"zgrep --version" is expected to print the version information in the same way as "zgrep -V". However, the case handling the --version flag is never reached, so "zgrep --version" prints: zgrep: missing pattern instead of: grep (BSD grep, GNU compatible) 2.6.0-FreeBSD Reviewed by: yuripv Approved by: yuripv (src) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D29813
This commit is contained in:
parent
1ffdcdadf6
commit
16e0391f8e
@ -94,6 +94,9 @@ do
|
|||||||
silent=1
|
silent=1
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
-V|--version)
|
||||||
|
exec ${grep} -V
|
||||||
|
;;
|
||||||
--*)
|
--*)
|
||||||
grep_args="${grep_args} $1"
|
grep_args="${grep_args} $1"
|
||||||
shift
|
shift
|
||||||
@ -128,9 +131,6 @@ do
|
|||||||
echo "${prg}: the ${1} flag is not currently supported" >&2
|
echo "${prg}: the ${1} flag is not currently supported" >&2
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
-V|--version)
|
|
||||||
exec ${grep} -V
|
|
||||||
;;
|
|
||||||
-*)
|
-*)
|
||||||
grep_args="${grep_args} $1"
|
grep_args="${grep_args} $1"
|
||||||
shift
|
shift
|
||||||
|
Loading…
Reference in New Issue
Block a user