about summary refs log tree commit diff
path: root/Completion/User/_tiff
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-01-15 09:11:31 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-01-15 09:11:31 +0000
commitca585f812b02071cc261fb9dbe463bab6f8be602 (patch)
treee90c1af1169132098b62207ced35fdf83607e910 /Completion/User/_tiff
parenta11115ecee1b5fc02b4b714561ffdbc2d2a3e622 (diff)
downloadzsh-ca585f812b02071cc261fb9dbe463bab6f8be602.tar.gz
zsh-ca585f812b02071cc261fb9dbe463bab6f8be602.tar.xz
zsh-ca585f812b02071cc261fb9dbe463bab6f8be602.zip
add `services', allowing easier re-use of (parts of) completion functions (13346)
Diffstat (limited to 'Completion/User/_tiff')
-rw-r--r--Completion/User/_tiff8
1 files changed, 4 insertions, 4 deletions
diff --git a/Completion/User/_tiff b/Completion/User/_tiff
index f780f6bca..c5c7c3c35 100644
--- a/Completion/User/_tiff
+++ b/Completion/User/_tiff
@@ -1,9 +1,9 @@
 #compdef -P (tiff*|*2tiff|pal2rgb)
 
-local pat expl ret=1 cmd="${words[1]:t}"
+local pat expl ret=1
 
-if [[ "$cmd" = *2tiff ]]; then
-  pat="*.(#i)${cmd%%2tiff}"
+if [[ "$service" = *2tiff ]]; then
+  pat="*.(#i)${service}"
 else
   pat="*.(#i)tiff"
 fi
@@ -23,7 +23,7 @@ local _in_tiff=yes
 local curcontext="$curcontext" state line ret=1
 typeset -A opt_args
 
-case "$cmd" in
+case "$service" in
 tiff2bw)
   _arguments -C \
     '-c[specify compression scheme]:compression scheme:->compress' \