Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: prevent some lines directly coming from the history from being executed
- X-seq: zsh-users 27804
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: prevent some lines directly coming from the history from being executed
- Date: Thu, 26 May 2022 17:13:24 +0100 (BST)
- Archived-at: <https://zsh.org/users/27804>
- Importance: Medium
- In-reply-to: <20220526155329.GF19001@tarpaulin.shahaf.local2>
- List-id: <zsh-users.zsh.org>
- References: <20220524154738.GA35284@cventin.lip.ens-lyon.fr> <CAH+w=7ZXO12Gb7LFGT0US=M=xBdi1XHoMU7t7n4=cbov+EKcNA@mail.gmail.com> <20220525025403.GA97860@zira.vinc17.org> <CAH+w=7apO+iFprYnGwTbrrV-jS7WEv1m7uok7NgXpoXGqS_F8w@mail.gmail.com> <20220525084920.GB97860@zira.vinc17.org> <CAH+w=7YnEiZEQpqACbYQEUzQ0SskZYcvmq1uvhsuvHNvoYstNw@mail.gmail.com> <20220526143602.GA1236826@zira.vinc17.org> <20220526155329.GF19001@tarpaulin.shahaf.local2>
> 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?
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