From e662d7f0eb5bdcf2b148ba835d0a0b01b0a47eab Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Mon, 21 Feb 2000 11:42:01 +0000 Subject: zsh-workers/9810 --- Completion/Core/_multi_parts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Completion/Core') 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}" -- cgit 1.4.1