From 1f6786ef7ae24ff858f52c6d4ac2bc23d529c0c1 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Mon, 12 Jul 1999 17:02:40 +0000 Subject: zsh-3.1.6-test-1 --- Completion/Core/_oldlist | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'Completion/Core/_oldlist') diff --git a/Completion/Core/_oldlist b/Completion/Core/_oldlist index f42197695..bdf12f90c 100644 --- a/Completion/Core/_oldlist +++ b/Completion/Core/_oldlist @@ -4,12 +4,24 @@ # and either the compconfig key oldlist_list is `always', or it is not `never' # and the list is not already shown, then use the existing list for listing # (even if it was generated by another widget). -if [[ -n $compstate[old_list] && $compconfig[oldlist_list] != never && - $WIDGET = *list* && - ( $compconfig[oldlist_list] = always || $compstate[old_list] != shown ) ]] -then - compstate[old_list]=keep - return 0 +# Do this also if there is an old list and it was generated by the +# completer named by the oldlist_list key. +if [[ -n $compstate[old_list] && $compconfig[oldlist_list] != never ]]; then + if [[ $WIDGET = *list* && + ( $compconfig[oldlist_list] = always || + $compstate[old_list] != shown ) ]]; then + compstate[old_list]=keep + return 0 + elif [[ $compconfig[oldlist_list] = *${_lastcomp[completer]}* ]]; then + [[ "$_lastcomp[insert]" = unambig* ]] && compstate[to_end]=single + compstate[old_list]=keep + if [[ -o automenu ]]; then + compstate[insert]=menu + else + compadd -Qs "$SUFFIX" - "$PREFIX" + fi + return 0 + fi fi # If this is a completion widget, and we have a completion inserted already, -- cgit 1.4.1