From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13690 invoked by alias); 17 Apr 2015 16:32:02 -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: X-Seq: 34919 Received: (qmail 6771 invoked from network); 17 Apr 2015 16:31:51 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_PASS autolearn=ham version=3.3.2 X-AuditID: cbfec7f5-f794b6d000001495-9d-553135783084 Date: Fri, 17 Apr 2015 17:31:43 +0100 From: Peter Stephenson To: zsh workers Subject: Re: PATCH: unwanted error aborting continued command substitution Message-id: <20150417173143.1565d543@pwslap01u.europe.root.pri> In-reply-to: <150417084645.ZM11686@torch.brasslantern.com> References: <20150417101600.09a17a9e@pwslap01u.europe.root.pri> <20150417120221.6f82b74c@pwslap01u.europe.root.pri> <150417084645.ZM11686@torch.brasslantern.com> Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrCLMWRmVeSWpSXmKPExsVy+t/xy7oVpoahBo+Oc1gcbH7I5MDoserg B6YAxigum5TUnMyy1CJ9uwSujKuLupgKfnBX3H34hKWB8RBnFyMnh4SAicSUi+9YIGwxiQv3 1rN1MXJxCAksZZRYO2sKC4Qzg0li5r7bUM42RokNz5pYQVpYBFQl1m/axghiswkYSkzdNBvM FgGKN3//BzZWWMBL4vOFf0xdjBwcvAL2Eod+GIOEOQWsJL7v/MAMMXMrk0RnwzY2kAS/gL7E 1b+fmCBOspeYeeUM2ExeAUGJH5Pvgc1kFtCS2LwN4gZmAXmJzWveMoPYQgLqEjfu7mafwCg0 C0nLLCQts5C0LGBkXsUomlqaXFCclJ5rpFecmFtcmpeul5yfu4kRErZfdzAuPWZ1iFGAg1GJ h3dDoEGoEGtiWXFl7iFGCQ5mJRFejm1AId6UxMqq1KL8+KLSnNTiQ4zSHCxK4rwzd70PERJI TyxJzU5NLUgtgskycXBKNTCqOP/3aRJa8FLqP/fP4152If0LFAwynNSzOheW/an5oOpe/Vn8 hf7WFX2K94WNJix6JBXy4LLjeelvRRJZB9Tn8jUuX/N3U8OjK0L7Onu4v66ZaVRTl/Gi5ezK lvJj2S7sun1HJ3OeP/g74fgSZY8OEfXwB9VtM1yOuG69Xfe+cBvjgiBr2wQlluKMREMt5qLi RABTwW90VwIAAA== On Fri, 17 Apr 2015 08:46:45 -0700 Bart Schaefer wrote: > push-input uses send-break, > and send-break is supposed to be a simulated interrupt for cases where > the TTY intr character is not set. > > So either send-break should actually set ERRFLAG_INT, or we need a third > error flag for simulated interrupts. Actually, it doesn't bother calling send-break, but I've found the point where it doesn't. Maybe the following is OK --- in fact, possibly we don't need the ERRFLAG_ERROR bit set, but I don't think it's doing any harm. One advantage of using a different bit would be we could abort back to the top of ZLE rather than out of ZLE and back in again, which would mean you finally had the ability to embed push-line in other widgets. But that's for another day. pws diff --git a/Src/Zle/zle_hist.c b/Src/Zle/zle_hist.c index 88623bb..cc66f99 100644 --- a/Src/Zle/zle_hist.c +++ b/Src/Zle/zle_hist.c @@ -854,7 +854,7 @@ pushlineoredit(char **args) } ret = pushline(args); if (!isfirstln) { - errflag |= ERRFLAG_ERROR; + errflag |= ERRFLAG_ERROR|ERRFLAG_INT; done = 1; } clearlist = 1; diff --git a/Src/Zle/zle_misc.c b/Src/Zle/zle_misc.c index 23286fc..4669ef2 100644 --- a/Src/Zle/zle_misc.c +++ b/Src/Zle/zle_misc.c @@ -1041,7 +1041,7 @@ copyprevshellword(UNUSED(char **args)) int sendbreak(UNUSED(char **args)) { - errflag |= ERRFLAG_ERROR; + errflag |= ERRFLAG_ERROR|ERRFLAG_INT; return 1; }