Fix handling of short xz options.

Was broken in 8f42adfa8d5e9fbbba9566d1b76d9f89667e6d98
This commit is contained in:
Ville Skyttä 2010-04-19 21:36:47 +03:00
parent b19c948a95
commit 7fc1fa88a8
8 changed files with 14 additions and 1 deletions

View File

@ -23,7 +23,7 @@ _xz()
local xspec="*.@(xz|lzma|txz|tlz)" local xspec="*.@(xz|lzma|txz|tlz)"
case $prev in case $prev in
--decompress|--list|--test|!(-*)[dlt]*) --decompress|--list|--test|-!(-*)[dlt]*)
xspec="!"$xspec xspec="!"$xspec
;; ;;
--files|--files0) --files|--files0)

0
test/fixtures/xz/a/b vendored Normal file
View File

0
test/fixtures/xz/bashcomp.lzma vendored Normal file
View File

0
test/fixtures/xz/bashcomp.tar vendored Normal file
View File

BIN
test/fixtures/xz/bashcomp.tar.xz vendored Normal file

Binary file not shown.

0
test/fixtures/xz/bashcomp.tlz vendored Normal file
View File

0
test/fixtures/xz/bashcomp.xz vendored Normal file
View File

View File

@ -17,4 +17,17 @@ assert_complete_any "xz "
sync_after_int sync_after_int
assert_complete "a/ bashcomp.lzma bashcomp.tar.xz bashcomp.tlz bashcomp.xz" \
"xz -d fixtures/xz/"
sync_after_int
assert_complete "a/ bashcomp.tar" "xz fixtures/xz/"
sync_after_int
teardown teardown