From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21293 invoked by alias); 6 Dec 2014 17:49:28 -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: 33885 Received: (qmail 18075 invoked from network); 6 Dec 2014 17:49:16 -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=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=AKpDk7pY c=1 sm=1 tr=0 a=FT8er97JFeGWzr5TCOCO5w==:117 a=kj9zAlcOel0A:10 a=q2GGsy2AAAAA:8 a=oR5dmqMzAAAA:8 a=-9mUelKeXuEA:10 a=A92cGCtB03wA:10 a=UKvVK46vzJca_4Sg8l0A:9 a=CjuIK1q_8ugA:10 From: Bart Schaefer Message-id: <141206094849.ZM1787@torch.brasslantern.com> Date: Sat, 06 Dec 2014 09:48:49 -0800 In-reply-to: Comments: In reply to Mikael Magnusson "Re: Interrupting globs (Re: Something rotten in tar completion)" (Dec 6, 12:49pm) 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> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: "Zsh Hackers' List" Subject: Re: Interrupting globs (Re: Something rotten in tar completion) MIME-version: 1.0 Content-type: text/plain; charset=us-ascii I was extremely busy yesterday and couldn't reply to this stuff in the order it was occurring, so apologies while I catch up back-to-front, so to speak. On Dec 6, 12:49pm, Mikael Magnusson wrote: } Subject: Re: Interrupting globs (Re: Something rotten in tar completion) } } >>> I suspect we'll just have to try this out and see how it works. } >> } >> This seems to work well for me in the cases you talked about, but I } >> quickly noticed one surprising problem. I have some stuff in my } >> chpwd() hook to show git branches and stuff, and these used to be } >> interruptible by ctrl-c (the commands are very fast with hot cache, } >> but can be somewhat painful with cold cache, like 5-10 seconds delay). } >> With the patch, I cannot interrupt them (sometimes?). } >> } > Ah, I think I understand what's happening now. Prior to the patch, } > pressing ctrl-c would abort out of chpwd() completely, but now it just } > aborts whichever single command is running. Since I have three git } > commands in there, I now need to press ctrl-c three times to get back } > to the prompt quickly. (I would like it to only require one). This is almost certainly a thinko (or a missed comparison of the value of errflag) somewhere in the errflag patch, as it implies that errflag is NOT remaining set, and I can't come up with why using a different value for interrupts would cause that. } Another difference: the menu completion listing could previously be } aborted with ctrl-c and keep the command line. It now closes the } listing and aborts the command line. Additionally, with menu } selection, you could previously ctrl-c out of selection and get to the } menu, ctrl-c that again, and still have the command line. Now you just } go straight from selection to a new empty command line. Does this happen ... (a) with the "trap ... INT" -> "TRAPINT()" change in _main_complete? Or (b) with PWS's change to errflag? Or (c) only with both? I suspect this is related to why I originally used the "trap" form -- I will have to refresh my memory, but I think having the trap run in the context of the caller was important in some way. (Reset in subshells may also be a factor.)