help / color / 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
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.


  reply index

Thread overview: 3+ 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

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:

* 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 \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link


Archives are clonable: git clone --mirror http://inbox.vuxu.org/zsh-workers

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git