diff options
Diffstat (limited to 'Completion/Core/_oldlist')
-rw-r--r-- | Completion/Core/_oldlist | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/Completion/Core/_oldlist b/Completion/Core/_oldlist index 2408613da..ba57ed6b4 100644 --- a/Completion/Core/_oldlist +++ b/Completion/Core/_oldlist @@ -1,13 +1,8 @@ #autoload -local curcontext="$curcontext" list menu - -# Probably set initial context. - -[[ -z "$curcontext" ]] && curcontext=':oldlist' +local curcontext="${curcontext}:oldlist" list _style -s '' list list -_style -s '' menu menu # If this is a listing widget and there is already an old list, # and either the style :oldlist:list is `always', or it is not `never' @@ -33,16 +28,12 @@ if [[ -n $compstate[old_list] && $list != never ]]; then fi # If this is a completion widget, and we have a completion inserted already, -# and the style :oldlist:menu is not never, then we cycle through the +# and the style :oldlist:menu is `true', then we cycle through the # existing list (even if it was generated by another widget). -if [[ $menu = verbose && - $LASTWIDGET = _verbose_list && $WIDGET != _verbose_list && - -z $compstate[old_insert] && - -n $compstate[old_list] ]]; then +if [[ -z $compstate[old_insert] && -n $compstate[old_list] ]]; then compstate[old_list]=keep -elif [[ $WIDGET = *complete(|-prefix|-word) && - $menu != (never|verbose) ]]; then +elif [[ $WIDGET = *complete(|-prefix|-word) ]] && _style '' menu; then if [[ -n $compstate[old_insert] ]]; then compstate[old_list]=keep if [[ $WIDGET = *reverse* ]]; then |