summary refs log tree commit diff
path: root/Completion/Unix/Command
diff options
context:
space:
mode:
authorOliver Kiddle <opk@users.sourceforge.net>2002-03-14 15:54:36 +0000
committerOliver Kiddle <opk@users.sourceforge.net>2002-03-14 15:54:36 +0000
commit975b133365b42c676faf08dc3d081a32a3bd8bb3 (patch)
tree9694c0b27924dbe7bf707e2dfe4dcba4f0548668 /Completion/Unix/Command
parent10cbfa987a94070ebe7786632af8ca3627bed43b (diff)
downloadzsh-975b133365b42c676faf08dc3d081a32a3bd8bb3.tar.gz
zsh-975b133365b42c676faf08dc3d081a32a3bd8bb3.tar.xz
zsh-975b133365b42c676faf08dc3d081a32a3bd8bb3.zip
16823: complete for values of GZIP and any *PATH or *path parameters
Diffstat (limited to 'Completion/Unix/Command')
-rw-r--r--Completion/Unix/Command/_gzip13
1 files changed, 10 insertions, 3 deletions
diff --git a/Completion/Unix/Command/_gzip b/Completion/Unix/Command/_gzip
index d1f26415b..8c3c8c8c3 100644
--- a/Completion/Unix/Command/_gzip
+++ b/Completion/Unix/Command/_gzip
@@ -1,9 +1,16 @@
-#compdef gzip gunzip gzcat=gunzip -redirect-,<,gunzip=gunzip -redirect-,>,gzip=gunzip -redirect-,<,gzip=gzip
+#compdef gzip gunzip gzcat=gunzip -redirect-,<,gunzip=gunzip -redirect-,>,gzip=gunzip -redirect-,<,gzip=gzip -value-,GZIP,-default-
 
-local decompress expl curcontext="$curcontext" state line
+local decompress files expl curcontext="$curcontext" state line
 typeset -A opt_args
 
+files=( '*:files:->files' )
 case "$service" in
+*GZIP*)
+  compset -q
+  words=( fake "$words[@]" )
+  (( CURRENT++ ))
+  files=()
+  ;&
 gunzip|zcat)
   decompress=yes
   ;&
@@ -51,7 +58,7 @@ gzip)
     '(--fast -1 -2 -3 -4 -5 -6 -7    -9 --best)-8' \
     '(--fast -1 -2 -3 -4 -5 -6 -7 -8    --best)-9' \
     '(--fast -1 -2 -3 -4 -5 -6 -7 -8 -9       )--best' \
-    '*:files:->files' && return 0
+    "$files[@]" && return 0
   ;;
 esac