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

Re: menu selection and enter key



"Virginia Mann" wrote:
> When I use the line (thanks Oliver and Andrey!)
> 
> bindkey -M menuselect '^M' .accept-line
> 
> It causes my enter key to do what I want it to do (execute immediately 
> instead of making me hit <enter> twice), so I put it in my .zshrc.
> 
> But when I first start up a new zsh, and .zshrc is sourced the first time, 
> this line fails with the error: "no such keymap `menuselect'".

If you are using the new completion system with the styles set for menu
selection, move this line after the call to compinit, since the
completion system will load the libraries for you.

Otherwise, put
  zmodload -i zsh/complist
just before it.  The -i stops it complaining if you re-source .zshrc.

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 692070


**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
prohibited.  
If you received this in error, please contact the sender and 
delete the material from any computer.
**********************************************************************



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