about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-06-06 13:04:10 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-06-06 13:04:10 +0000
commit423543d389101594269ded5d386affd01c9f2edf (patch)
tree6c8898350afafc1ae61be4518188adf3d98ebb66 /Completion
parent24559bb1f681c6037cdc91ed4b1a0ffb70be173a (diff)
downloadzsh-423543d389101594269ded5d386affd01c9f2edf.tar.gz
zsh-423543d389101594269ded5d386affd01c9f2edf.tar.xz
zsh-423543d389101594269ded5d386affd01c9f2edf.zip
make _expand ignore empty expansions (11777)
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Core/_expand4
1 files changed, 2 insertions, 2 deletions
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