summaryrefslogtreecommitdiffstats
path: root/Completion/Core
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>2000-02-28 09:25:17 +0000
committerTanaka Akira <akr@users.sourceforge.net>2000-02-28 09:25:17 +0000
commit3e87739e57bade63a8cbfa44f1279afa33c29185 (patch)
treef8a5e74e79632292234a735bab00d3323cc78b8a /Completion/Core
parentzsh-workers/9892 (diff)
downloadzsh-3e87739e57bade63a8cbfa44f1279afa33c29185.tar
zsh-3e87739e57bade63a8cbfa44f1279afa33c29185.tar.gz
zsh-3e87739e57bade63a8cbfa44f1279afa33c29185.tar.bz2
zsh-3e87739e57bade63a8cbfa44f1279afa33c29185.tar.lz
zsh-3e87739e57bade63a8cbfa44f1279afa33c29185.tar.xz
zsh-3e87739e57bade63a8cbfa44f1279afa33c29185.tar.zst
zsh-3e87739e57bade63a8cbfa44f1279afa33c29185.zip
zsh-workers/9893
Diffstat (limited to 'Completion/Core')
-rw-r--r--Completion/Core/_multi_parts15
1 files changed, 8 insertions, 7 deletions
diff --git a/Completion/Core/_multi_parts b/Completion/Core/_multi_parts
index c4182a6a1..8b21d4df1 100644
--- a/Completion/Core/_multi_parts
+++ b/Completion/Core/_multi_parts
@@ -128,9 +128,10 @@ while true; do
-M "r:|${sep}=* r:|=* $match" - "$tmp1[1]"
fi
fi
- return 0
+ return
fi
elif (( $#tmp1 )); then
+ local ret=1
# More than one match. First we get all strings that match the
# rest from the line.
@@ -164,10 +165,10 @@ while true; do
if [[ "$i" = *${sep}* ]]; then
compadd "$group[@]" "$expl[@]" -r "$sep" -S "$sep" "$opts[@]" \
-p "$pref" \
- -M "r:|${sep}=* r:|=* $match" - "${i%%${sep}*}"
+ -M "r:|${sep}=* r:|=* $match" - "${i%%${sep}*}" && ret=0
else
compadd "$group[@]" "$expl[@]" -S '' "$opts[@]" -p "$pref" \
- -M "r:|${sep}=* r:|=* $match" - "$i"
+ -M "r:|${sep}=* r:|=* $match" - "$i" && ret=0
fi
done
else
@@ -179,14 +180,14 @@ while true; do
if [[ "$i" = *${sep}* ]]; then
compadd "$group[@]" "$expl[@]" -r "$sep" -S "$sep" "$opts[@]" \
-p "$pref" -s "${i#*${sep}}" \
- -M "r:|${sep}=* r:|=* $match" - "${i%%${sep}*}"
+ -M "r:|${sep}=* r:|=* $match" - "${i%%${sep}*}" && ret=0
else
compadd "$group[@]" "$expl[@]" -S '' "$opts[@]" -p "$pref" \
- -M "r:|${sep}=* r:|=* $match" - "$i"
+ -M "r:|${sep}=* r:|=* $match" - "$i" && ret=0
fi
done
fi
- return 0
+ return ret
else
# We are here if no string matched what's on the line. In this
# case we insert the expanded prefix we collected if it differs
@@ -205,7 +206,7 @@ while true; do
compadd "$group[@]" "$expl[@]" -S '' "$opts[@]" \
-M "r:|${sep}=* r:|=* $match" - "$pref$pre"
fi
- return 0
+ return
fi
fi