diff options
-rw-r--r-- | Completion/Core/_multi_parts | 6 |
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}" |