diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-07-12 09:25:18 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-07-12 09:25:18 +0000 |
commit | 8e2fa4d9b2196e8f3a199cc22400ba35bcb21556 (patch) | |
tree | c07277bf8cc78edc1428a5ba041afc139a3b2778 | |
parent | d05b3e675ee6ca508ac242d2760ffc49a55753ac (diff) | |
download | zsh-8e2fa4d9b2196e8f3a199cc22400ba35bcb21556.tar.gz zsh-8e2fa4d9b2196e8f3a199cc22400ba35bcb21556.tar.xz zsh-8e2fa4d9b2196e8f3a199cc22400ba35bcb21556.zip |
don't start menu selection with only select=long (12226)
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | Completion/Core/_main_complete | 26 |
2 files changed, 19 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog index 13cad62b9..a0780698c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2000-07-12 Sven Wischnowsky <wischnow@zsh.org> + * 12226: Completion/Core/_main_complete: don't start menu + selection with only select=long + * 12225: Completion/Linux/_rpm: check if options were completed 2000-07-11 Peter Stephenson <pws@cambridgesiliconradio.com> 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" |