mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-02 22:11:54 +02:00
make _expand ignore empty expansions (11777)
This commit is contained in:
parent
24559bb1f6
commit
423543d389
2 changed files with 5 additions and 2 deletions
|
@ -1,5 +1,8 @@
|
|||
2000-06-06 Sven Wischnowsky <wischnow@zsh.org>
|
||||
|
||||
* 11777: Completion/Core/_expand: make _expand ignore empty
|
||||
expansions
|
||||
|
||||
* 11776: Completion/Core/_path_files: fix for _path_files and
|
||||
globcomplete, better test if word contains wildcards
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ fi
|
|||
|
||||
# If the array is empty, store the original string again.
|
||||
|
||||
(( $#exp )) || exp=("$word")
|
||||
[[ -z "$exp" ]] && exp=("$word")
|
||||
|
||||
subd=("$exp[@]")
|
||||
|
||||
|
@ -92,7 +92,7 @@ zstyle -s ":completion:${curcontext}:" sort sort
|
|||
if (( $#exp == 1 )); then
|
||||
if [[ -d $exp && "$exp[1]" != */ ]]; then
|
||||
suf=/
|
||||
elif zstyle -T ":completion:${curcontext}:" add-space; then
|
||||
elif ! zstyle -T ":completion:${curcontext}:" add-space; then
|
||||
suf=
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue