[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 7fc1fa88a89b335244f89cc8b74dfca67255faed

Ville Skyttä ville.skytta at iki.fi
Mon Apr 19 18:37:34 UTC 2010


The following commit has been merged in the master branch:
commit 7fc1fa88a89b335244f89cc8b74dfca67255faed
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Mon Apr 19 21:36:47 2010 +0300

    Fix handling of short xz options.
    
    Was broken in 8f42adfa8d5e9fbbba9566d1b76d9f89667e6d98

diff --git a/contrib/xz b/contrib/xz
index 8f02b1d..3a543f3 100644
--- a/contrib/xz
+++ b/contrib/xz
@@ -23,7 +23,7 @@ _xz()
     local xspec="*.@(xz|lzma|txz|tlz)"
 
     case $prev in
-        --decompress|--list|--test|!(-*)[dlt]*)
+        --decompress|--list|--test|-!(-*)[dlt]*)
             xspec="!"$xspec
             ;;
         --files|--files0)
diff --git a/test/fixtures/_filedir/a b/i b/test/fixtures/xz/a/b
similarity index 100%
copy from test/fixtures/_filedir/a b/i
copy to test/fixtures/xz/a/b
diff --git a/test/fixtures/_filedir/a b/i b/test/fixtures/xz/bashcomp.lzma
similarity index 100%
copy from test/fixtures/_filedir/a b/i
copy to test/fixtures/xz/bashcomp.lzma
diff --git a/test/fixtures/_filedir/a b/i b/test/fixtures/xz/bashcomp.tar
similarity index 100%
copy from test/fixtures/_filedir/a b/i
copy to test/fixtures/xz/bashcomp.tar
diff --git a/test/fixtures/xz/bashcomp.tar.xz b/test/fixtures/xz/bashcomp.tar.xz
new file mode 100644
index 0000000..b2274e6
Binary files /dev/null and b/test/fixtures/xz/bashcomp.tar.xz differ
diff --git a/test/fixtures/_filedir/a b/i b/test/fixtures/xz/bashcomp.tlz
similarity index 100%
copy from test/fixtures/_filedir/a b/i
copy to test/fixtures/xz/bashcomp.tlz
diff --git a/test/fixtures/_filedir/a b/i b/test/fixtures/xz/bashcomp.xz
similarity index 100%
copy from test/fixtures/_filedir/a b/i
copy to test/fixtures/xz/bashcomp.xz
diff --git a/test/lib/completions/xz.exp b/test/lib/completions/xz.exp
index 474ab24..820b068 100644
--- a/test/lib/completions/xz.exp
+++ b/test/lib/completions/xz.exp
@@ -17,4 +17,17 @@ assert_complete_any "xz "
 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

-- 
bash-completion



More information about the Bash-completion-commits mailing list