Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
RE: menu selection and enter key
- X-seq: zsh-users 5961
- From: Borzenkov Andrey <Andrey.Borzenkov@xxxxxxxxxxx>
- To: "'Oliver Kiddle'" <okiddle@xxxxxxxxxxx>, "'Virginia Mann'" <tuanglen@xxxxxxxxxxx>
- Subject: RE: menu selection and enter key
- Date: Tue, 11 Mar 2003 10:19:06 +0300
- Cc: zsh-users@xxxxxxxxxx
- Importance: Normal
- In-reply-to: <2431.1047304522@xxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
> "Virginia Mann" wrote:
> > 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.
>
But you may just as well continue editing current line without executing it.
> accept-line in menu selection is redefined to do that. If I've
> understood what you want it to do correctly, you can do:
>
> double-accept() {
> zle accept-line && zle accept-line
> }
> zle -N double-accept
> bindkey -M menuselect '^M' double-accept
>
Would not simple
bindkey -M menuselect '^M' .accept-line
be easier?
-andrey
Messages sorted by:
Reverse Date,
Date,
Thread,
Author