Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH] _xz: Complete compressed, rather than uncompressed, files after -d.



---
 Completion/Unix/Command/_xz | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Completion/Unix/Command/_xz b/Completion/Unix/Command/_xz
index 333557e66..a4dfea1f5 100644
--- a/Completion/Unix/Command/_xz
+++ b/Completion/Unix/Command/_xz
@@ -61,7 +61,7 @@ esac
 case $state in
   files)
     (( $+opt_args[-z] || $+opt_args[--compress] )) && decompress=no
-    [[ -n $opt_args[(i)-([dtl]|-decompress|-test|-list)] ]] && unset decompress
+    [[ -n ${(k)opt_args[(i)decomp*]} ]] && unset decompress
     if [[ -z "$decompress" ]]; then
       _description files expl 'compressed file'
       _files "$expl[@]" -g '*.(xz|txz|lzma|tlz)(-.)' && return



Messages sorted by: Reverse Date, Date, Thread, Author