From 6959ffd9621fdb8f33b53e1c0be05f3f294742a5 Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Thu, 25 May 2000 07:58:44 +0000 Subject: force listing in _complete_debug; make complist with list-scrolling stopt at the end of the list when prompt would scroll it out; fix _in_vared to handle `foo[bar]' (11565) --- Completion/Base/_in_vared | 15 +++++++++++---- Completion/Commands/_complete_debug | 1 + 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'Completion') 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>&- } -- cgit 1.4.1