summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Completion/Unix/Command/_xz2
2 files changed, 4 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index d6d6bb382..01e3f6a22 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2017-08-02  Daniel Shahaf  <d.s@daniel.shahaf.name>
 
+	* 41479: Completion/Unix/Command/_xz: Complete compressed,
+	rather than uncompressed, files after -d.
+
 	* 41475: Completion/Unix/Command/_git: Complete files after
 	'reset' when there are no commits, when the 'verbose' style
 	is set.
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