about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2002-06-26 11:07:42 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2002-06-26 11:07:42 +0000
commitd28f67623f03ec9905e2e3f10b2f3dd7f61956ca (patch)
tree16c5640d9568a2b6d091f84d6c4b40f738efede0 /Completion
parent03105a5d6e148754606df7e654e98cce07ae00ac (diff)
downloadzsh-d28f67623f03ec9905e2e3f10b2f3dd7f61956ca.tar.gz
zsh-d28f67623f03ec9905e2e3f10b2f3dd7f61956ca.tar.xz
zsh-d28f67623f03ec9905e2e3f10b2f3dd7f61956ca.zip
two new modes for menu selection: incremental search and interactive (17366)
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Base/Core/_main_complete13
-rw-r--r--Completion/Zsh/Command/_zstyle3
2 files changed, 15 insertions, 1 deletions
diff --git a/Completion/Base/Core/_main_complete b/Completion/Base/Core/_main_complete
index f3ad720c9..a78d0ec42 100644
--- a/Completion/Base/Core/_main_complete
+++ b/Completion/Base/Core/_main_complete
@@ -267,6 +267,19 @@ if [[ $compstate[old_list] = keep || nm -gt 1 ]]; then
         unset MENUSELECT
       fi
     fi
+    if [[ -n "$MENUSELECT" ]]; then
+      if [[ -n "$_menu_style[(r)interactive*]" ]]; then
+        MENUMODE=interactive
+      elif [[ -n "$_menu_style[(r)search*]" ]]; then
+        if [[ -n "$_menu_style[(r)*backward*]" ]]; then
+          MENUMODE=search-backward
+        else
+          MENUMODE=search-forward
+        fi
+      else
+        unset MENUMODE
+      fi
+    fi
   fi
 elif [[ nm -lt 1 && -n "$_comp_mesg" ]]; then
   compstate[insert]=''
diff --git a/Completion/Zsh/Command/_zstyle b/Completion/Zsh/Command/_zstyle
index bab202ca0..e72074202 100644
--- a/Completion/Zsh/Command/_zstyle
+++ b/Completion/Zsh/Command/_zstyle
@@ -206,7 +206,8 @@ while (( $#state )); do
       ;;
 
     boolauto) 
-      _wanted values expl boolean compadd true false auto select
+      _wanted values expl boolean \
+          compadd true false auto select search search-backward interactive
       ;;
 
     cmdorcont)