zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: [BUG] With CORRECT_ALL, an interrupted correct puts a truncated entry in history
Date: Sat, 9 Dec 2023 13:44:42 -0800	[thread overview]
Message-ID: <CAH+w=7YXzr2w06kpD+FvyVJ7sJrcnyC+X7x+rfaeqr=Jo3TbrQ@mail.gmail.com> (raw)
In-Reply-To: <20231206150333.GA385094@zira.vinc17.org>

On Wed, Dec 6, 2023 at 7:03 AM Vincent Lefevre <vincent@vinc17.net> wrote:
>
> On 2023-12-05 13:22:07 -0800, Bart Schaefer wrote:
> > On Tue, Dec 5, 2023 at 4:57 AM Vincent Lefevre <vincent@vinc17.net> wrote:
> > >
> > > I thought that this would have been put in a temporary buffer,
> > > until the (possibly corrected) command is validated.
> >
> > I'm not sure what you think "validated" means here.
>
> Once the user has no longer any way to discard the command line,
> which will then be really run.

Ah.  It's in the buffer managed in ZLE as $BUFFER, but corrections
apply left to right as that buffer is converted into a parse tree,
they don't alter the buffer itself.

> > I'm not going to make a decision on that without further feedback.
>
> Yes, that's why I had suggested an explicit action for that

Altering the prompt to add more cases is one of the things I won't do
without feedback.

> Or just use 'e', then immediately put the command in the history
> without running it. Is there a zle widget for that? I would find
> this useful even when there are no spelling corrections.

That would be push-input, which is not bound to anything by default,
but could probably be bound to ESC (shift)Q without disrupting use of
push-line on ESC q.

Correction is not itself a ZLE action -- it happens after ZLE has
returned control to the parser, and works even if ZLE is disabled.  So
there's no widget to fiddle with it.


  reply	other threads:[~2023-12-09 21:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-05  2:12 Vincent Lefevre
2023-12-05  4:10 ` Bart Schaefer
2023-12-05 12:57   ` Vincent Lefevre
2023-12-05 21:22     ` Bart Schaefer
2023-12-06 15:03       ` Vincent Lefevre
2023-12-09 21:44         ` Bart Schaefer [this message]
2023-12-17 13:54           ` Vincent Lefevre
2023-12-17 19:37             ` Bart Schaefer
2023-12-18  3:37               ` Vincent Lefevre
2023-12-18  6:36                 ` Bart Schaefer
2024-01-21  5:06     ` 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='CAH+w=7YXzr2w06kpD+FvyVJ7sJrcnyC+X7x+rfaeqr=Jo3TbrQ@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@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).