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

Re: prevent some lines directly coming from the history from being executed

> On 26 May 2022 at 16:53 Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
> Vincent Lefevre wrote on Thu, May 26, 2022 at 16:36:02 +0200:
> > On 2022-05-25 18:25:40 -0700, Bart Schaefer wrote:
> > > On Wed, May 25, 2022 at 1:49 AM Vincent Lefevre <vincent@xxxxxxxxxx> wrote:
> > > > zle -A accept-line real-accept-line
> > > 
> > > There's the built-in ".accept-line" widget for this sort of thing, so
> > > you don't have to create a new alias.
> > 
> > Is this documented?
> > 
> > When searching the man pages, I could find only one place where
> > such a built-in is used: in the example for recursive-edit.
> but, yes, it should be mentioned in the zle documentation too, not only
> in the compsys documentation.
> Anyone volunteering to write the patch?

zle.yo contains the following.  We don't have the actual names for
all the widgets, which makes them hard to search for, but the actual
rule is very simple once you know it.  So while this isn't ideal I'm
not sure what we'd want to change.  Should we put some examples here of
the cases you're most likely to use, in particular .accept-line?


The standard widgets built into ZLE are listed in
ifzman(the section `Standard Widgets' below)\
ifnzman(noderef(Standard Widgets)).
Other built-in widgets can be defined by other modules (see
ifnzman(noderef(Zsh Modules))\
).  Each built-in widget has two names: its normal canonical name, and the
same name preceded by a `tt(.)'.  The `tt(.)' name is special: it can't be
rebound to a different widget.  This makes the widget available even when
its usual name has been redefined.

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