summaryrefslogtreecommitdiff
path: root/Completion
diff options
context:
space:
mode:
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Base/Core/_main_complete3
-rw-r--r--Completion/Base/Utility/_arguments2
-rw-r--r--Completion/Base/Utility/_values1
-rw-r--r--Completion/Zsh/Command/_zle2
4 files changed, 6 insertions, 2 deletions
diff --git a/Completion/Base/Core/_main_complete b/Completion/Base/Core/_main_complete
index c50ff9db4..9bc5611de 100644
--- a/Completion/Base/Core/_main_complete
+++ b/Completion/Base/Core/_main_complete
@@ -23,7 +23,8 @@ eval "$_comp_setup"
local func funcs ret=1 tmp _compskip format nm call match min max i num\
_completers _completer _completer_num curtag _comp_force_list \
_matchers _matcher _c_matcher _matcher_num _comp_tags _comp_mesg \
- mesg str context state line opt_args val_args curcontext="$curcontext" \
+ mesg str context state state_descr line opt_args val_args \
+ curcontext="$curcontext" \
_last_nmatches=-1 _last_menu_style _def_menu_style _menu_style sel \
_tags_level=0 \
_saved_exact="${compstate[exact]}" \
diff --git a/Completion/Base/Utility/_arguments b/Completion/Base/Utility/_arguments
index 126d9c315..d70c44259 100644
--- a/Completion/Base/Utility/_arguments
+++ b/Completion/Base/Utility/_arguments
@@ -344,6 +344,7 @@ if (( $# )) && comparguments -i "$autod" "$singopt[@]" "$@"; then
context=()
state=()
+ state_descr=()
while true; do
while _tags; do
@@ -376,6 +377,7 @@ if (( $# )) && comparguments -i "$autod" "$singopt[@]" "$@"; then
if (( ! $state[(I)$action] )); then
comparguments -W line opt_args
state+=( "$action" )
+ state_descr+=( "$descr" )
if [[ -n "$usecc" ]]; then
curcontext="${oldcontext%:*}:$subc"
else
diff --git a/Completion/Base/Utility/_values b/Completion/Base/Utility/_values
index c2ae26465..ab0e46a9c 100644
--- a/Completion/Base/Utility/_values
+++ b/Completion/Base/Utility/_values
@@ -87,6 +87,7 @@ if compvalues -i "$@"; then
if [[ "$action" = -\>* ]]; then
compvalues -v val_args
state="${${action[3,-1]##[ ]#}%%[ ]#}"
+ state_descr="$descr"
if [[ -n "$usecc" ]]; then
curcontext="${oldcontext%:*}:$subc"
else
diff --git a/Completion/Zsh/Command/_zle b/Completion/Zsh/Command/_zle
index 80f217711..2bfc708e5 100644
--- a/Completion/Zsh/Command/_zle
+++ b/Completion/Zsh/Command/_zle
@@ -44,7 +44,7 @@ case "$state[1]" in
'(-)*:widget arguments: ' && ret=0
;;
(widget*)
- _wanted -C "$context[1]" widgets expl widget compadd -k widgets && ret=0
+ _wanted -C "$context[1]" widgets expl "${state_descr[1]:-widget}" compadd -k widgets && ret=0
;&
(function)
[[ $state[1] != *function ]] || # Handle fall-through