about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Completion/Core/_expand4
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