Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: prevent some lines directly coming from the history from being executed
Peter Stephenson wrote on Thu, 26 May 2022 16:13 +00:00:
>> 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?
Thanks.
I expected there'd be an instance of «tt(.)var(widget)», and that's what
I initially grepped for.
Vincent, what did you search the man pages for?
Cheers,
Daniel
> pws
>
> 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
> ifzman(zmanref(zshmodules))\
> 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