zsh-workers
 help / color / mirror / code / Atom feed
From: Stephane Chazelas <stephane@chazelas.org>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: send-break or EOF exit the shell in "vared"
Date: Sun, 9 Feb 2020 09:09:02 +0000	[thread overview]
Message-ID: <20200209090902.lolaes3dh6a2n5sd@chazelas.org> (raw)
In-Reply-To: <20200209083316.axjj6nf7hndb7wqw@chazelas.org>

2020-02-09 08:33:16 +0000, Stephane Chazelas:
[...]
> zsh -c 'vared -c foo; echo $? $foo'
> 
> If I press ^G (send-break widget), that exits the shell (with
> status 0), not just "vared".
[...]

Looks like a regression. That changed in 5.0.8, 5.0.7 was fine.
git bisect points at: https://www.zsh.org/mla/workers/2015/msg00843.html
which was about avoiding syntax error messages upon ^C/^G/push-input.

Setting the "continueonerror" option doesn't help.

doc says:

send-break (^G ESC-^G) (unbound) (unbound)
     Abort the current editor function, e.g.  execute-named-command, or
     the editor itself, e.g.  if you are in vared.  Otherwise abort the
     parsing of the current line; in this case the aborted line is
     available in the shell variable ZLE_LINE_ABORTED.  If the editor is
     aborted from within vared, the variable ZLE_VARED_ABORTED is set.

So it is indeed a bug.

I suppose there's also the question of what push-line,
push-input should do in vared.

-- 
Stephane

  reply	other threads:[~2020-02-09  9:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-09  8:33 Stephane Chazelas
2020-02-09  9:09 ` Stephane Chazelas [this message]
2020-02-10 17:03 ` Sebastian Gniazdowski
2020-06-10  0:53 ` 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=20200209090902.lolaes3dh6a2n5sd@chazelas.org \
    --to=stephane@chazelas.org \
    --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).