zsh-users
 help / color / mirror / code / Atom feed
From: "Daniel Shahaf" <d.s@daniel.shahaf.name>
To: zsh-users@zsh.org, "Vincent Lefevre" <vincent@vinc17.net>
Subject: Re: prevent some lines directly coming from the history from being executed
Date: Fri, 27 May 2022 12:40:32 +0000	[thread overview]
Message-ID: <b11ecf60-4aca-4a9e-8985-74eb8b98f48c@www.fastmail.com> (raw)
In-Reply-To: <1936193667.415066.1653581604546@mail2.virginmedia.com>

Peter Stephenson wrote on Thu, 26 May 2022 16:13 +00:00:
>> On 26 May 2022 at 16:53 Daniel Shahaf <d.s@daniel.shahaf.name> 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@vinc17.net> 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.


  reply	other threads:[~2022-05-27 12:42 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-24 15:47 Vincent Lefevre
2022-05-24 18:58 ` Bart Schaefer
2022-05-25  2:54   ` Vincent Lefevre
2022-05-25  3:59     ` Bart Schaefer
2022-05-25  8:49       ` Vincent Lefevre
2022-05-26  1:25         ` Bart Schaefer
2022-05-26 14:36           ` Vincent Lefevre
2022-05-26 15:53             ` Daniel Shahaf
2022-05-26 16:13               ` Peter Stephenson
2022-05-27 12:40                 ` Daniel Shahaf [this message]
2022-05-28  0:07                   ` Vincent Lefevre
2022-05-28 10:06                     ` Daniel Shahaf
2022-05-28 18:43                       ` Bart Schaefer
2022-05-29 22:55                         ` Daniel Shahaf
2022-05-30  4:04                           ` Bart Schaefer
2022-05-30  9:07                             ` Peter Stephenson
2022-06-02  9:59                               ` Daniel Shahaf
2022-06-02 10:19                               ` Daniel Shahaf
2022-06-02  9:59                             ` Daniel Shahaf
2022-05-30  9:02                       ` Vincent Lefevre
2022-06-02 10:17                         ` Daniel Shahaf
2022-06-02 13:54                           ` Vincent Lefevre
2022-05-26 16:37             ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b11ecf60-4aca-4a9e-8985-74eb8b98f48c@www.fastmail.com \
    --to=d.s@daniel.shahaf.name \
    --cc=vincent@vinc17.net \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).