From 423543d389101594269ded5d386affd01c9f2edf Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Tue, 6 Jun 2000 13:04:10 +0000 Subject: make _expand ignore empty expansions (11777) --- Completion/Core/_expand | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Completion') 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 -- cgit 1.4.1