From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3288 invoked by alias); 5 Dec 2014 18:06:35 -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: 33869 Received: (qmail 24485 invoked from network); 5 Dec 2014 18:06:33 -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=IOK10brD 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=mUV-hiseImBFNpmnSrUA:9 a=CjuIK1q_8ugA:10 From: Bart Schaefer Message-id: <141205100632.ZM508@torch.brasslantern.com> Date: Fri, 05 Dec 2014 10:06:32 -0800 In-reply-to: <20141205145054.655a2f70@pwslap01u.europe.root.pri> Comments: In reply to Peter Stephenson "Re: Interrupting globs (Re: Something rotten in tar completion)" (Dec 5, 2:50pm) 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> 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 On Dec 5, 2:50pm, Peter Stephenson wrote: } Subject: Re: Interrupting globs (Re: Something rotten in tar completion) } } > This seems to help: } > } > diff --git a/Src/glob.c b/Src/glob.c } > index ca7bc44..b3903f2 100644 } > --- a/Src/glob.c } > +++ b/Src/glob.c } > @@ -463,7 +463,7 @@ scanner(Complist q, int shortcircuit) } > int errssofar = errsfound; } > struct dirsav ds; } > } > - if (!q) } > + if (!q || errflag) } > return; } > init_dirsav(&ds); } } Not for me: it's more basic than that. The trap in _main_complete isn't } working *at all* --- or, rather, it's working too well, by trapping all } errors. Not speaking directly for completion, but withOUT the above patch: % : /**/*(/) is not interruptible. WITH the above patch, the recursive glob can be interrupted. } It's using an eval-style trap, so the "return" in it is forcing the } current function in the completion code to return with that status and } no error flagged. That was actually intentional based on the behavior complaint that led to the trap being added. Changing the type of trap addresses a slightly different problem. What we need is some way to get both.