1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-03 10:21:46 +02:00

zsh-workers/9149

This commit is contained in:
Tanaka Akira 1999-12-23 22:07:01 +00:00
parent df6b4aadbb
commit aac49ecdbd
2 changed files with 6 additions and 2 deletions

View file

@ -37,9 +37,11 @@ elif _popd || [[ $PREFIX != (\~|/|./|../)* && $#cdpath -ne 0 ]]; then
PREFIX="~$PREFIX"
_path_files -/
else
local tmpcdpath
tmpcdpath=(${(@)cdpath:#.})
_alternative \
'local-directories:local directories:_path_files -/' \
"path-directories: directories in cdpath:_path_files -W \\(${${(@)cdpath:#.}}\\) -/"
"path-directories:directories in cdpath:_path_files -W tmpcdpath -/"
fi
else
_path_files -/

View file

@ -44,7 +44,9 @@ while getopts "P:S:qr:R:W:F:J:V:X:f/g:M:12n" opt; do
if [[ "$tmp1[1]" = '(' ]]; then
prepaths=( ${^=tmp1[2,-2]%/}/ )
else
prepaths=( ${(P)^=tmp1%/}/ )
# In this case the variable should be an array, so
# don't use an extra ${=...}.
prepaths=( ${(P)^tmp1%/}/ )
(( ! $#prepaths )) && prepaths=( ${tmp1%/}/ )
fi
(( ! $#prepaths )) && prepaths=( '' )