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

Re: Start an external editor to edit the current zle buffer



On 2005-11-04 16:10:49 +0000, Peter Stephenson wrote:
> Vincent Lefevre wrote:
> > Shouldn't it become part of zle?
> 
> I don't think so.  The functions are supplied to be extensible and
> flexible.  It's hardly harder to use a function widget than a builtin
> one and it's much easier to change it.  For something like this, which
> runs external commands and handles the output, it's also much easier to
> write the function in the shell command language than in C.

I agree, but this wasn't really my question. The main problem is that
this feature isn't documented in zshzle, therefore more difficult to
find.

> One of the reasons for the new manual roadmap is to indicate things like
> the presence of add-on zle functions documented in zshcontrib which users
> might otherwise not notice, although it doesn't specifically mention
> edit-command-line.

I reformulate my question: couldn't edit-command-line become more
official and be documented in the zshzle man page?

Also,

  autoload edit-command-line
  zle -N edit-command-line
  bindkey '\ee' edit-command-line

is more code to type (even if it is done once). Could there be a zsh
option so that

  bindkey '\ee' edit-command-line

automatically calls autoload and zle -N if need be?

> > > FCEDIT is specific to the fc command.  edit-command-line assumes you
> > > want to use your normal editor.  You can easily change it.
> > 
> > Why doesn't fc assume I want to use my normal editor?
> 
> Historical reasons, presumably, since this came from ksh.  It's not much
> used.

OK. BTW, why is FCEDIT defined by default as "vi"? Why not let it
unset, in which case $VISUAL or $EDITOR would be used?

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / SPACES project at LORIA



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