mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-01 17:24:50 +01:00
51470 (tweaked, c.f. 51476): Separate cdpath elements in path-directories completion
This commit is contained in:
parent
f604645d06
commit
bb36b80178
2 changed files with 13 additions and 2 deletions
|
@ -1,5 +1,9 @@
|
|||
2023-02-24 Oliver Kiddle <opk@zsh.org>
|
||||
|
||||
* Sebastian Stark: 51470 (tweaked, c.f. 51476):
|
||||
Completion/Zsh/Command/_cd: Separate cdpath elements in
|
||||
path-directories completion
|
||||
|
||||
* 51474: Completion/Unix/Command/_ansible: make -e and --vault-id
|
||||
options repeatable and update for new options to ansible 2.13.2
|
||||
|
||||
|
|
|
@ -70,8 +70,15 @@ else
|
|||
|
||||
tmpcdpath=(${${(@)cdpath:#.}:#$PWD})
|
||||
|
||||
(( $#tmpcdpath )) &&
|
||||
alt=( 'path-directories:directory in cdpath:_path_files -W tmpcdpath -/' )
|
||||
if zstyle -t ":completion:${curcontext}:path-directories" separate-sections; then
|
||||
local elem
|
||||
for ((elem=1; elem <= $#tmpcdpath; elem++)); do
|
||||
alt+=( "path-directories-$elem:directory in $tmpcdpath[$elem]:_path_files -W 'tmpcdpath[$elem]' -/" )
|
||||
done
|
||||
else
|
||||
(( $#tmpcdpath )) &&
|
||||
alt=( 'path-directories:directory in cdpath:_path_files -W tmpcdpath -/' )
|
||||
fi
|
||||
|
||||
# With cdablevars, we can complete foo as if ~foo/
|
||||
if [[ -o cdablevars && -n "$PREFIX" && "$PREFIX" != <-> ]]; then
|
||||
|
|
Loading…
Reference in a new issue