summary refs log tree commit diff
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2017-08-01 13:00:58 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2017-08-02 14:09:59 +0000
commit623be7199e09d977c22b2cbaa8ed19849f84ead0 (patch)
treeeea2279ce791214f45143a9612e2d3d8f0da8660
parent17a6eb655d0952c090c36abeec4ba17c11b3b165 (diff)
downloadzsh-623be7199e09d977c22b2cbaa8ed19849f84ead0.tar.gz
zsh-623be7199e09d977c22b2cbaa8ed19849f84ead0.tar.xz
zsh-623be7199e09d977c22b2cbaa8ed19849f84ead0.zip
41479: _xz: Complete compressed, rather than uncompressed, files after -d.
-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