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:
parent
df6b4aadbb
commit
aac49ecdbd
2 changed files with 6 additions and 2 deletions
|
@ -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 -/
|
||||
|
|
|
@ -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=( '' )
|
||||
|
|
Loading…
Reference in a new issue