about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-12-06 09:29:28 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-12-06 09:29:28 +0000
commit5f61b262a515286c7789cd26abf4d9140fb2d06d (patch)
treebb337e4b1849395b74c51ee69dde385a6979f984
parenta0559fd2b6450c21c9cd76a610a5300b656347f9 (diff)
downloadzsh-5f61b262a515286c7789cd26abf4d9140fb2d06d.tar.gz
zsh-5f61b262a515286c7789cd26abf4d9140fb2d06d.tar.xz
zsh-5f61b262a515286c7789cd26abf4d9140fb2d06d.zip
zsh-workers/8906
-rw-r--r--Completion/Core/_path_files6
1 files changed, 3 insertions, 3 deletions
diff --git a/Completion/Core/_path_files b/Completion/Core/_path_files
index 2367def63..79b1473c4 100644
--- a/Completion/Core/_path_files
+++ b/Completion/Core/_path_files
@@ -39,10 +39,10 @@ while getopts "P:S:qr:R:W:F:J:V:X:f/g:M:" opt; do
          ;;
   W)     tmp1="$OPTARG"
          if [[ "$tmp1[1]" = '(' ]]; then
-           prepaths=( ${^=tmp1[2,-2]}/ )
+           prepaths=( ${^=tmp1[2,-2]%/}/ )
          else
-           prepaths=( ${(P)=${tmp1}} )
-           (( ! $#prepaths )) && prepaths=( ${tmp1}/ )
+           prepaths=( ${(P)^=tmp1%/}/ )
+           (( ! $#prepaths )) && prepaths=( ${tmp1%/}/ )
          fi
          (( ! $#prepaths )) && prepaths=( '' )
          ;;