about summary refs log tree commit diff
path: root/Completion/Core
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Core')
-rw-r--r--Completion/Core/_multi_parts6
1 files changed, 5 insertions, 1 deletions
diff --git a/Completion/Core/_multi_parts b/Completion/Core/_multi_parts
index 6f758f761..92da26f9a 100644
--- a/Completion/Core/_multi_parts
+++ b/Completion/Core/_multi_parts
@@ -80,7 +80,11 @@ while true; do
   # use the stuff from the line. This avoids having `foo' complete to
   # both `foo' and `foobar'.
 
-  tmp1=( "${(@M)matches:#${PREFIX}${SUFFIX}${sep}*}" )
+  if [[ -n "$PREFIX$SUFFIX" || "$pre" = ${sep}* ]]; then
+    tmp1=( "${(@M)matches:#${PREFIX}${SUFFIX}${sep}*}" )
+  else
+    tmp1=
+  fi
 
   if (( $#tmp1 )); then
     npref="${PREFIX}${SUFFIX}${sep}"