Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

carriage return (<enter> key) behavior during menu completion



I have in my ~.zshrc:

autoload -U compinit
compinit
setopt menu_complete
zstyle ':completion:*' menu select=1 _complete _ignored _approximate
LISTMAX=9999

If I do "cd <tab>", zsh will list all the directories in a menu. However, after
<tab>-ing to a directory I want, I have to press the <enter> key twice -- once
to exit the menu, and once more to execute the cd command with the selected
directory.  Is there a way to make it so that I only have to press <enter>
_once_ to execute the command whenever the completion menu is running?

Interestingly, <enter> behaves like I want it to without menus (without the
'zstyle' line above), but with the menus, it's different for some reason.

Thanks,
Linus



Messages sorted by: Reverse Date, Date, Thread, Author