about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-07-12 09:25:18 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-07-12 09:25:18 +0000
commit8e2fa4d9b2196e8f3a199cc22400ba35bcb21556 (patch)
treec07277bf8cc78edc1428a5ba041afc139a3b2778 /Completion
parentd05b3e675ee6ca508ac242d2760ffc49a55753ac (diff)
downloadzsh-8e2fa4d9b2196e8f3a199cc22400ba35bcb21556.tar.gz
zsh-8e2fa4d9b2196e8f3a199cc22400ba35bcb21556.tar.xz
zsh-8e2fa4d9b2196e8f3a199cc22400ba35bcb21556.zip
don't start menu selection with only select=long (12226)
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Core/_main_complete26
1 files changed, 16 insertions, 10 deletions
diff --git a/Completion/Core/_main_complete b/Completion/Core/_main_complete
index 8d77bbd2e..707b48d72 100644
--- a/Completion/Core/_main_complete
+++ b/Completion/Core/_main_complete
@@ -175,7 +175,7 @@ if [[ $compstate[old_list] = keep || nm -gt 1 ]]; then
           -n "$_menu_style[(r)(yes|true|on|1)=long-list]" ) ]]; then
     compstate[insert]=menu
   elif [[ "$compstate[insert]" = "$_saved_insert" ]]; then
-    if [[ -n "$_menu_style[(r)select=long]" && tmp -gt LINES ]]; then
+    if [[ -n "$_menu_style[(r)(yes|true|1|on)=long]" && tmp -gt LINES ]]; then
         compstate[insert]=menu
     else
       sel=( "${(@M)_menu_style:#(yes|true|1|on)*}" )
@@ -183,11 +183,13 @@ if [[ $compstate[old_list] = keep || nm -gt 1 ]]; then
       if (( $#sel )); then
 	min=9999999
         for i in "$sel[@]"; do
-          if [[ "$i" = *\=* ]]; then
+          if [[ "$i" = *\=[0-9]* ]]; then
   	    num="${i#*\=}"
   	    [[ num -lt 0 ]] && num=0
-  	  else
-  	    num=$nm
+  	  elif [[ "$i" != *\=* ]]; then
+  	    num=0
+          else
+	    num=9999999
   	  fi
   	  [[ num -lt min ]] && min="$num"
   
@@ -199,11 +201,13 @@ if [[ $compstate[old_list] = keep || nm -gt 1 ]]; then
       if (( $#sel )); then
 	max=9999999
         for i in "$sel[@]"; do
-          if [[ "$i" = *\=* ]]; then
+          if [[ "$i" = *\=[0-9]* ]]; then
   	    num="${i#*\=}"
   	    [[ num -lt 0 ]] && num=0
-  	  else
+          elif [[ "$i" != *\=* ]]; then
   	    num=0
+  	  else
+  	    num=9999999
   	  fi
   	  [[ num -lt max ]] && max="$num"
   
@@ -229,20 +233,22 @@ if [[ $compstate[old_list] = keep || nm -gt 1 ]]; then
     elif [[ -n "$_menu_style[(r)select=long*]" ]]; then
       if [[ tmp -gt LINES ]]; then
         zmodload -i zsh/complist
-        MENUSELECT=0
+        MENUSELECT=00
       fi
     fi
-    if [[ "$MENUSELECT" != 0 ]]; then
+    if [[ "$MENUSELECT" != 00 ]]; then
       sel=( "${(@M)_menu_style:#select*}" )
 
       if (( $#sel )); then
 	min=9999999
         for i in "$sel[@]"; do
-          if [[ "$i" = *\=* ]]; then
+          if [[ "$i" = *\=[0-9]* ]]; then
   	    num="${i#*\=}"
   	    [[ num -lt 0 ]] && num=0
-  	  else
+  	  elif [[ "$i" != *\=* ]]; then
   	    num=0
+          else
+	    num=9999999
   	  fi
   	  [[ num -lt min ]] && min="$num"