From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 76262aa3 for ; Sun, 9 Feb 2020 09:09:51 +0000 (UTC) Received: (qmail 13974 invoked by alias); 9 Feb 2020 09:09:44 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 45405 Received: (qmail 2633 invoked by uid 1010); 9 Feb 2020 09:09:44 -0000 X-Qmail-Scanner-Diagnostics: from relay2-d.mail.gandi.net by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.1/25713. spamassassin: 3.4.2. Clear:RC:0(217.70.183.194):SA:0(-2.6/5.0):. Processed in 3.625313 secs); 09 Feb 2020 09:09:44 -0000 X-Envelope-From: stephane@chazelas.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _nblcust.gandi.net designates 217.70.183.194 as permitted sender) X-Originating-IP: 2.127.75.28 Date: Sun, 9 Feb 2020 09:09:02 +0000 From: Stephane Chazelas To: Zsh hackers list Subject: Re: send-break or EOF exit the shell in "vared" Message-ID: <20200209090902.lolaes3dh6a2n5sd@chazelas.org> Mail-Followup-To: Zsh hackers list References: <20200209083316.axjj6nf7hndb7wqw@chazelas.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200209083316.axjj6nf7hndb7wqw@chazelas.org> User-Agent: NeoMutt/20180716 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