Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Does zsh have anything like readline's edit-and-execute-command ?
- X-seq: zsh-users 12840
- From: Robin Lee Powell <rlpowell@xxxxxxxxxxxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>, zsh-users@xxxxxxxxxx
- Subject: Re: Does zsh have anything like readline's edit-and-execute-command ?
- Date: Wed, 7 May 2008 12:11:40 -0700
- In-reply-to: <20080507190242.GA864@xxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20080507012634.GC11527@xxxxxxxxxxxxxxxxxx> <080507002557.ZM2091@xxxxxxxxxxxxxxxxxxxxxx> <20080507173204.GG11527@xxxxxxxxxxxxxxxxxx> <20080507182802.GB5843@xxxxxxxxxxxxxxx> <20080507184442.GH11527@xxxxxxxxxxxxxxxxxx> <20080507190242.GA864@xxxxxxxxxxxxxxxxxx>
On Wed, May 07, 2008 at 08:02:42PM +0100, N.J. Mann wrote:
> In message <20080507184442.GH11527@xxxxxxxxxxxxxxxxxx>, Robin Lee
> Powell (rlpowell@xxxxxxxxxxxxxxxxxx) wrote:
> > On Wed, May 07, 2008 at 07:28:02PM +0100, Stephane Chazelas
> > wrote:
> > > On Wed, May 07, 2008 at 10:32:04AM -0700, Robin Lee Powell
> > > wrote:
> > > [...]
> > > > Ah. Silly me for using "man zshzle". :P I'll go back to
> > > > using "man zshall" all the time, I think.
> > > [...]
> > >
> > > You may want to consider "info" instead. "info" has got a
> > > searchable index and table of content like a book.
> >
> > info is nigh-unusable
>
> Agreed! :-)
>
> > It wouldn't have helped at all in this case, though, as I had no
> > idea where in the hierarchy to look. I'm trying to get
> > edit-command-line to work now, and I *still* don't know where to
> > look.
>
> I just tried the example in the book _From Bash to Z Shell_, which
> I highly recommend and think those involved did a great job, and
> it just worked. Okay, so I used a different key binding from that
> in the book but that was to prevent it clashing with other
> bindings I have. The book suggests:
>
> autoload -U edit-command-line
> zle -N edit-command-line
> bindkey '\ee' edit-command-line
>
> to make ESC-e bring up the editor. I used ^E.
Yeah, that's what worked for me too.
This Is Not Obvious. (tm)
I was looking for information on how to load already-existing
widgets into zle, not creat new ones. The -N option says:
-N WIDGET [ FUNCTION ]
Create a user-defined widget. If there is already a widget
with the specified name, it is overwritten.
This is clearly not what I was looking for, so I stopped reading at
that point and moved on to the next option.
I only figured it out because of comments in the source file for
edit-command-line.
-Robin
Messages sorted by:
Reverse Date,
Date,
Thread,
Author