about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-04-27 08:21:10 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-04-27 08:21:10 +0000
commitad31ce0db8118be03843711cfe7cf418835fb114 (patch)
treee98368efd7d4e4c77af37c73362df30c0fdf9db3 /Completion
parentd00d0f0efa8e2021c9aa80d8f22c332a3ce3eb7c (diff)
downloadzsh-ad31ce0db8118be03843711cfe7cf418835fb114.tar.gz
zsh-ad31ce0db8118be03843711cfe7cf418835fb114.tar.xz
zsh-ad31ce0db8118be03843711cfe7cf418835fb114.zip
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)
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Core/_main_complete26
1 files changed, 14 insertions, 12 deletions
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