about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-09-02 08:36:11 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-09-02 08:36:11 +0000
commit5cdc4938bdfef17d778686ca39c6736306241c53 (patch)
tree3584648a256a6f3f7691f5d5c7024abe36fff188
parentc94eb651696b777b81a2062ef8a5b0915f6b6efa (diff)
downloadzsh-5cdc4938bdfef17d778686ca39c6736306241c53.tar.gz
zsh-5cdc4938bdfef17d778686ca39c6736306241c53.tar.xz
zsh-5cdc4938bdfef17d778686ca39c6736306241c53.zip
zsh-workers/7625
-rw-r--r--Completion/Base/_arguments9
1 files changed, 4 insertions, 5 deletions
diff --git a/Completion/Base/_arguments b/Completion/Base/_arguments
index d2b276cf0..5925cbc42 100644
--- a/Completion/Base/_arguments
+++ b/Completion/Base/_arguments
@@ -43,10 +43,9 @@ if [[ "$*" != "$_args_cache_descr" ]]; then
       tmpargv=( "${(@)argv[1,nth-1]}" )
     fi
 
-    if [[ "$words[1]" = /* ]]; then
-      tmp="$words[1]"
-    else
-      tmp="$PWD/$words[1]"
+    tmp=${~words[1]}
+    if [[ "$tmp" != /* ]]; then
+      tmp="$PWD/$tmp"
     fi
 
     if [[ "$tmp" != "$_args_cache_longcmd" ]]; then
@@ -92,7 +91,7 @@ if [[ "$*" != "$_args_cache_descr" ]]; then
       # those hyphens and anything from the space or comma after the
       # option up to the end. 
 
-      lopts=("--${(@)^${(@)${(@)${(@M)${(@ps:\n:j:\n:)${(@)${(@M)${(@f)$("$words[1]" --help 2>&1)//\[--/
+      lopts=("--${(@)^${(@)${(@)${(@M)${(@ps:\n:j:\n:)${(@)${(@M)${(@f)$(${~words[1]} --help 2>&1)//\[--/
 --}:#[ 	]#-*}//,/
 }}:#[ 	]#--*}#*--}%%[, ]*}:#}")