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

Re: menu selection and enter key




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 I do some menu selection and then rerun this .zshrc, the bindkey works and sets the desired behavior.

It appears that I need to load something before I execute this line. Or maybe there's a way to instruct zsh to accept it because the needed bits will be loaded later (like a C++ forward declaration).

I have no idea. I don't want to accidentally switch my default keymap to menuselect or load more than necessary or cause something to reload everytime I source my .zshrc by forcing a manual load or whatever else may go wrong. What would be the best approach for use in my .zshrc to get this line to work sensibly?

Thanks.



_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail



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