From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 275 invoked by alias); 8 Dec 2014 15:51:58 -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: 33933 Received: (qmail 6190 invoked from network); 8 Dec 2014 15:51:45 -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=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=UzDs0KL7C/5g7FXGKQU+cewbVLO9U2hyv9700dYmBz8=; b=gOKMdzJg/SHb9/GJ8F6h/mdhhULS3sjQy9DE2sSHLcl6Cam88aQgt2hqh5oythUBHw bFZ2jSpxamzXpTEcxDrCjHsfL0C+ylW9bnAeelYF+iLqK6+Yb7lVtgpunDSXGWyjkQHu t/kK2VOW683jdwU/ULDap2radEmw+MaXmYNsby98NJf0tF+9VVW/fwPprvIBnchfEx3M Gu3RrS9Iva3bsBpIBeReRGV8FoWZIQlM9D3aept5kdmPnEQM63Tz81AYIKmmPxsq4rju eup9E4RToK897yb/8YOP6AI795Z41yV68+EA164K/NyGyfeTateuOPQwxrRMTfasGlpM UsKQ== MIME-Version: 1.0 X-Received: by 10.42.25.144 with SMTP id a16mr27007293icc.66.1418053903396; Mon, 08 Dec 2014 07:51:43 -0800 (PST) In-Reply-To: <20141208130334.4ea54996@pwslap01u.europe.root.pri> References: <20141202155452.647182b4@pwslap01u.europe.root.pri> <141202084858.ZM31517@torch.brasslantern.com> <20141202172654.30e7d380@pwslap01u.europe.root.pri> <141204085606.ZM9146@torch.brasslantern.com> <20141204171226.301e9d2c@pwslap01u.europe.root.pri> <141205002023.ZM19736@torch.brasslantern.com> <20141205145054.655a2f70@pwslap01u.europe.root.pri> <141205100632.ZM508@torch.brasslantern.com> <20141205181330.2b458b46@pwslap01u.europe.root.pri> <20141205203417.2bc66b7b@pws-pc.ntlworld.com> <20141205220717.2f86bdd2@pws-pc.ntlworld.com> <141206211828.ZM15934@torch.brasslantern.com> <20141207170713.1a71fe0d@pws-pc.ntlworld.com> <20141207171920.0913aae9@pws-pc.ntlworld.com> <20141208111806.5cd1ced5@pwslap01u.europe.root.pri> <20141208130334.4ea54996@pwslap01u.europe.root.pri> Date: Mon, 8 Dec 2014 16:51:43 +0100 Message-ID: Subject: Re: Interrupting globs (Re: Something rotten in tar completion) From: Mikael Magnusson To: Peter Stephenson Cc: "Zsh Hackers' List" Content-Type: text/plain; charset=UTF-8 On Mon, Dec 8, 2014 at 2:03 PM, Peter Stephenson wrote: > On Mon, 8 Dec 2014 13:43:11 +0100 > Mikael Magnusson wrote: >> Test case for you guys: >> % zsh -f >> % precmd() echo yes >> % sleep 2; echo no >> ^C >> yes > > I will assume it's uncontroversial that we do want the yes and not the > no. It looks reasonable. (As an entirely separate matter, I wonder if > precmd should have the error status available to it?) Indeed, I update my prompt with the current directory in precmd, and not doing that is quite confusing. (No opinion on this, but it seems to right now?) >> With :/'Ensure propagation' and :/'Put back' (eg, current tip of >> interrupt_abort), I get neither printed. >> >> So I guess some other place needs to clear interrupts as well, or the >> "return to commandline" clear should be before precmd being called? >> (If that's nonsense it's because I haven't looked at the code for that >> at all). > > I think we should clear it before and after precmd to be safe. > > It's not really clear to me why this worked before; one of the various > other errflag-clearings must have come in before we reached the > top-level loop. I'm not sure if that was intentional or accidental, but > presumably somewhere high up in loop() with toplevel == 1 is right. I > can't work out if it should be even higher, before the history mechanism > starts. With this patch, everything seems to work as expected for me. (famous last words)