diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-06-06 13:04:10 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-06-06 13:04:10 +0000 |
commit | 423543d389101594269ded5d386affd01c9f2edf (patch) | |
tree | 6c8898350afafc1ae61be4518188adf3d98ebb66 | |
parent | 24559bb1f681c6037cdc91ed4b1a0ffb70be173a (diff) | |
download | zsh-423543d389101594269ded5d386affd01c9f2edf.tar.gz zsh-423543d389101594269ded5d386affd01c9f2edf.tar.xz zsh-423543d389101594269ded5d386affd01c9f2edf.zip |
make _expand ignore empty expansions (11777)
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | Completion/Core/_expand | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog index d3b0825cd..6fb1a4bbe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 diff --git a/Completion/Core/_expand b/Completion/Core/_expand index fb146e0de..094806f29 100644 --- a/Completion/Core/_expand +++ b/Completion/Core/_expand @@ -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 |