zsh-users
 help / color / mirror / code / Atom feed
* menu selection and enter key
@ 2003-03-09  6:41 Virginia Mann
  2003-03-10 13:55 ` Oliver Kiddle
  0 siblings, 1 reply; 5+ messages in thread
From: Virginia Mann @ 2003-03-09  6:41 UTC (permalink / raw)
  To: zsh-users

I'm configuring zsh for the first time and trying to understand the 
features.

I find menu completion very useful, and I like seeing the list of candidates 
below it. <tab><tab><tab> yes, that's the one I want<enter>, and it 
executes.

Then I found menu *selection*, which let me see where I was as I tabbed thru 
the candidates by highlighting where I am in the list, which is very 
convenient. Unfortunately, when I reach the one I want and hit <enter>, it 
no longer executes. Now it just inserts a space and sits there waiting for 
me to enter more. I have to hit enter again to make it execute.

I like being able to see where I am on the list more than tabbing thru it 
blindly, and I like being able to navigate particularly long lists by using 
the arrow keys (very nice), but how do I get it to execute when I hit 
<enter> the first time, just the way it does when I'm tabbing thru the list 
without highlighting? If I want to enter two parameters -- which is the 
minority of cases -- I should be able to just hit the spacebar and start 
tabbing again the way I can when the "selection" highlighting is turned off, 
I would think.

Can menu completion with selection turned on be made to execute on the first 
tab like it can with selection turned off?

Thanks.




_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail


^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: menu selection and enter key
@ 2003-03-14 20:45 Virginia Mann
  2003-03-17 10:31 ` Peter Stephenson
  0 siblings, 1 reply; 5+ messages in thread
From: Virginia Mann @ 2003-03-14 20:45 UTC (permalink / raw)
  To: zsh-users


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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-03-17 10:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-09  6:41 menu selection and enter key Virginia Mann
2003-03-10 13:55 ` Oliver Kiddle
2003-03-11  7:19   ` Borzenkov Andrey
2003-03-14 20:45 Virginia Mann
2003-03-17 10:31 ` Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).