aboutsummaryrefslogtreecommitdiff
path: root/src/scripts
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2014-10-09 18:42:14 +0300
committerLasse Collin <lasse.collin@tukaani.org>2014-10-09 18:42:14 +0300
commitefa7b0a210e1baa8e128fc98c5443a944c39ad24 (patch)
treee8e20012fa99ebe28e9dfb51d528463acd00eddc /src/scripts
parentl10n: vi.po: Update Vietnamese translation (diff)
downloadxz-efa7b0a210e1baa8e128fc98c5443a944c39ad24.tar.xz
xzgrep: Avoid passing both -q and -l to grep.
The behavior of grep -ql varies: - GNU grep behaves like grep -q. - OpenBSD grep behaves like grep -l. POSIX doesn't make it 100 % clear what behavior is expected. Anyway, using both -q and -l at the same time makes no sense so both options simply should never be used at the same time. Thanks to Christian Weisgerber.
Diffstat (limited to 'src/scripts')
-rw-r--r--src/scripts/xzgrep.in6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/scripts/xzgrep.in b/src/scripts/xzgrep.in
index 018915f7..a1fd19cf 100644
--- a/src/scripts/xzgrep.in
+++ b/src/scripts/xzgrep.in
@@ -106,9 +106,11 @@ while test $# -ne 0; do
with_filename=1
continue;;
(-l | --files-with-*)
- files_with_matches=1;;
+ files_with_matches=1
+ continue;;
(-L | --files-witho*)
- files_without_matches=1;;
+ files_without_matches=1
+ continue;;
(-h | --no-f*)
no_filename=1;;
(-V | --v | --ve | --ver | --vers | --versi | --versio | --version)