926d9e8893789e1b70cb4df2144c868f4aa91515

Author
kremso <kramar.tomas@gmail.com>
Committer
Robby Russell <robby@planetargon.com>
Date

Message

Don't autoselect first completion entry (Fixes #14)

The key here is not using MENU_COMPLETE which autoselects the first
entry, but using AUTO_MENU which displays the menu but autoselects
on successive tab hit.

Also, do not use zstyle menu yes because that somehow overrides
the setopts.

Diff

 1diff --git a/lib/completion.zsh b/lib/completion.zsh
 2index 46b6d8f656a72cfb59007211af38181c979af73e..619dc0243b34ecd9c930b785bc49b30ee907961f 100644
 3--- a/lib/completion.zsh
 4+++ b/lib/completion.zsh
 5@@ -1,11 +1,11 @@
 6 ## fixme - the load process here seems a bit bizarre
 7 
 8-setopt noautomenu
 9+unsetopt menu_complete   # do not autoselect the first completion entry
10+unsetopt flowcontrol
11+setopt auto_menu         # show completion menu on succesive tab press
12 setopt complete_in_word
13 setopt always_to_end
14 
15-unsetopt flowcontrol
16-
17 WORDCHARS=''
18 
19 autoload -U compinit
20@@ -23,14 +23,10 @@ fi
21 
22 zstyle ':completion:*' list-colors ''
23 
24-
25-unsetopt MENU_COMPLETE
26-#setopt AUTO_MENU
27-
28 # should this be in keybindings?
29 bindkey -M menuselect '^o' accept-and-infer-next-history
30 
31-zstyle ':completion:*:*:*:*:*' menu yes select
32+zstyle ':completion:*:*:*:*:*' menu select
33 # zstyle ':completion:*:*:*:*:processes' force-list always
34 
35 zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01'