From ad31ce0db8118be03843711cfe7cf418835fb114 Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Thu, 27 Apr 2000 08:21:10 +0000 Subject: renamed parameters for menu selection to MENUSELECT, MENUPROMPT and MENUSCROLL; no special value for LISTMAX to turn on list scrolling, this is done by setting LISTPROMPT now; default values for LISTPROMPT and MENUPROMPT when set but empty (10959) --- Completion/Core/_main_complete | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'Completion') diff --git a/Completion/Core/_main_complete b/Completion/Core/_main_complete index 5513a3629..7c1135959 100644 --- a/Completion/Core/_main_complete +++ b/Completion/Core/_main_complete @@ -47,25 +47,27 @@ fi _setup default _def_menu_style=( "$_last_menu_style[@]" -# We can't really do that because the current value of $SELECTMIN +# We can't really do that because the current value of $MENUSELECT # may be the one set by this function. # There is a similar problem with $ZLS_COLORS in _setup. -# ${SELECTMIN+select${SELECTMIN:+\=$SELECTMIN}} +# ${MENUSELECT+select${MENUSELECT:+\=$MENUSELECT}} ) _last_menu_style=() -zstyle -s ":completion:${curcontext}:default" list-prompt LISTPROMPT || - LISTPROMPT='%SAt %p: Hit TAB for more, or the character to insert%s' -if [[ -n "$LISTPROMPT" ]]; then +if zstyle -s ":completion:${curcontext}:default" list-prompt tmp; then + LISTPROMPT="$tmp" + zmodload -i zsh/complist +fi +if zstyle -s ":completion:${curcontext}:default" select-prompt tmp; then + MENUPROMPT="$tmp" + zmodload -i zsh/complist +fi +if zstyle -s ":completion:${curcontext}:default" select-scroll tmp; then + MENUSCROLL="$tmp" zmodload -i zsh/complist - compstate[list_max]=scroll fi -zstyle -s ":completion:${curcontext}:default" select-prompt SELECTPROMPT || - SELECTPROMPT='%SScrolling active: current selection at %p%s' -zstyle -s ":completion:${curcontext}:default" select-scroll SELECTSCROLL || - SELECTSCROLL=1 # Get the names of the completers to use in the positional parameters. @@ -148,7 +150,7 @@ if [[ $compstate[old_list] = keep || nm -gt 1 ]]; then if [[ "$compstate[insert]" = *menu* ]]; then if [[ -n "$_menu_style[(r)no-select*]" ]]; then - unset SELECTMIN + unset MENUSELECT else sel=( "${(@M)_menu_style:#select*}" ) @@ -168,7 +170,7 @@ if [[ $compstate[old_list] = keep || nm -gt 1 ]]; then done zmodload -i zsh/complist - SELECTMIN="$min" + MENUSELECT="$min" fi fi fi -- cgit 1.4.1