From d779b43f42b331841f6ffa973f77f9fb97811b84 Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Fri, 7 Apr 2000 12:43:31 +0000 Subject: make sure caller-supplied explanation takes precedence (10579) --- Completion/Base/_arguments | 5 +++-- Completion/Base/_values | 5 +++-- Completion/Core/_alternative | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) (limited to 'Completion') diff --git a/Completion/Base/_arguments b/Completion/Base/_arguments index 29e5764fe..f633b7cf5 100644 --- a/Completion/Base/_arguments +++ b/Completion/Base/_arguments @@ -258,8 +258,9 @@ if (( $# )) && comparguments -i "$autod" "$@"; then # Otherwise we call it with the description-arguments. eval "action=( $action )" - _all_labels arguments expl "$descr" \ - "$action[1]" "$subopts[@]" "${(@)action[2,-1]}" + while _next_label arguments expl "$descr"; do + "$action[1]" "$subopts[@]" "$expl[@]" "${(@)action[2,-1]}" + done fi fi fi diff --git a/Completion/Base/_values b/Completion/Base/_values index 62cf0e409..eff7b94ce 100644 --- a/Completion/Base/_values +++ b/Completion/Base/_values @@ -141,8 +141,9 @@ if compvalues -i "$@"; then # Otherwise we call it with the description-arguments built above. eval "action=( $action )" - _all_labels arguments expl "$descr" \ - "$action[1]" "$subopts[@]" "${(@)action[2,-1]}" + while _next_label arguments expl "$descr"; do + "$action[1]" "$subopts[@]" "$expl[@]" "${(@)action[2,-1]}" + done fi fi diff --git a/Completion/Core/_alternative b/Completion/Core/_alternative index b038aa8a4..d6aef96b6 100644 --- a/Completion/Core/_alternative +++ b/Completion/Core/_alternative @@ -66,8 +66,9 @@ while _tags; do # Otherwise we call it with the description-arguments built above. eval "action=( $action )" - _all_labels "${def%%:*}" expl "$descr" \ - "$action[1]" "$subopts[@]" "${(@)action[2,-1]}" + while _next_label "${def%%:*}" expl "$descr"; do + "$action[1]" "$subopts[@]" "$expl[@]" "${(@)action[2,-1]}" + done fi fi done -- cgit 1.4.1