about summary refs log tree commit diff
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
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
-rw-r--r--ChangeLog6
-rw-r--r--Completion/Unix/Command/_gzip13
-rw-r--r--Completion/Unix/Type/.distfiles2
-rw-r--r--Completion/Unix/Type/_dir_list2
-rw-r--r--Completion/Unix/Type/_directories2
5 files changed, 19 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index ecdae8150..d9fdbcf0f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2002-03-14  Oliver Kidddle  <opk@zsh.org>
+
+	* 16823: Completion/Unix/Command/_gzip,
+	Completion/Unix/Type/_dir_list, Completion/Unix/Type/_directories:
+	complete for values of GZIP and any *path or *PATH parameters
+
 2002-03-14  Peter Stephenson  <pws@csr.com>
 
 	* 16821 (adapted, c.f. 16831): Completion/Unix/Command/_bzip2,
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
 
diff --git a/Completion/Unix/Type/.distfiles b/Completion/Unix/Type/.distfiles
index 40a193a40..52d55f0ca 100644
--- a/Completion/Unix/Type/.distfiles
+++ b/Completion/Unix/Type/.distfiles
@@ -8,5 +8,5 @@ _domains             _path_files          _ps                  _user_at_host
 _files               _pdf                 _pspdf               _users
 _groups              _perl_basepods       _signals             _users_on
 _hosts               _perl_builtin_funcs  _tar_archive         _time_zone
-_file_systems        _net_interfaces      _terminals
+_file_systems        _net_interfaces      _terminals           _locales
 '
diff --git a/Completion/Unix/Type/_dir_list b/Completion/Unix/Type/_dir_list
index ecd7c73da..574e8a2af 100644
--- a/Completion/Unix/Type/_dir_list
+++ b/Completion/Unix/Type/_dir_list
@@ -1,4 +1,4 @@
-#autoload
+#compdef -value-,TERMINFO_DIRS,-default- -P -value-,*PATH,-default-
 
 # options:
 #  -s <sep> to specify the separator (default is a colon)
diff --git a/Completion/Unix/Type/_directories b/Completion/Unix/Type/_directories
index cdf76e443..6cc7aa3f8 100644
--- a/Completion/Unix/Type/_directories
+++ b/Completion/Unix/Type/_directories
@@ -1,4 +1,4 @@
-#compdef rmdir df du dircmp
+#compdef rmdir df du dircmp -P -value-,*path,-default-
 
 local expl