about summary refs log tree commit diff
path: root/Completion/User/_tiff
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-04-05 11:28:08 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-04-05 11:28:08 +0000
commitb8bdb144d2a310632efb3bbd7dd78d4f296bc62f (patch)
tree8c32a29b3e72dce2728535f4a5ead0be9a7f8e89 /Completion/User/_tiff
parentfc426939cc5a8bc7acd809f9e013e6c10ede044f (diff)
downloadzsh-b8bdb144d2a310632efb3bbd7dd78d4f296bc62f.tar.gz
zsh-b8bdb144d2a310632efb3bbd7dd78d4f296bc62f.tar.xz
zsh-b8bdb144d2a310632efb3bbd7dd78d4f296bc62f.zip
use basename of commands instead of $words[1]
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 318c536d0..9616009c3 100644
--- a/Completion/User/_tiff
+++ b/Completion/User/_tiff
@@ -1,9 +1,9 @@
 #compdef -P (tiff*|*2tiff|pal2rgb)
 
-local pat expl ret=1
+local pat expl ret=1 cmd="${words[1]:t}"
 
-if [[ "$words[1]" = *2tiff ]]; then
-  pat="*.(#i)${words[1]%%2tiff}"
+if [[ "$cmd" = *2tiff ]]; then
+  pat="*.(#i)${cmd%%2tiff}"
 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 "$words[1]" in
+case "$cmd" in
 tiff2bw)
   _arguments -C \
     '-c[specify compression scheme]:compression scheme:->compress' \