diff options
Diffstat (limited to 'Completion')
-rwxr-xr-x | Completion/Base/_in_vared | 15 | ||||
-rw-r--r-- | Completion/Commands/_complete_debug | 1 |
2 files changed, 12 insertions, 4 deletions
diff --git a/Completion/Base/_in_vared b/Completion/Base/_in_vared index 4d8e814db..c21601cdf 100755 --- a/Completion/Base/_in_vared +++ b/Completion/Base/_in_vared @@ -5,10 +5,17 @@ local also # Completion inside vared. if [[ $compstate[vared] = *\[* ]]; then - # vared on an array-element - compstate[parameter]=${compstate[vared]%%\[*} - compstate[context]=-value- - also=value + if [[ $compstate[vared] = *\]* ]]; then + # vared on an array-element + compstate[parameter]=${${compstate[vared]%%\]*}//\[/-} + compstate[context]=value + also=-value- + else + # vared on an array-value + compstate[parameter]=${compstate[vared]%%\[*} + compstate[context]=value + also=-value- + fi else # vared on a parameter, let's see if it is an array compstate[parameter]=$compstate[vared] diff --git a/Completion/Commands/_complete_debug b/Completion/Commands/_complete_debug index 7672c75ea..aeb2027a7 100644 --- a/Completion/Commands/_complete_debug +++ b/Completion/Commands/_complete_debug @@ -22,6 +22,7 @@ unsetopt xtrace # _message -r "Trace output left in $tmp (up-history to view)" # print -sR "${VISUAL:-${EDITOR:-${PAGER:-more}}} $tmp ;: $w" _message -r "Trace output left in $tmp" + compstate[list]='list force' print -zR "${VISUAL:-${EDITOR:-${PAGER:-more}}} $tmp ;: $w" exec 2>&3 3>&- } |