From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29992 invoked by alias); 7 Dec 2014 07:16:00 -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: 33903 Received: (qmail 16860 invoked from network); 7 Dec 2014 07:15:56 -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=d8CqBxwPIxqlU07swLVuwuS6La4iDKTvuAOrexw80R0=; b=oTWPuInwhoxIovNMd01FeG0YDhC8NX3vKOrW+3BI72EfuX6FmP2nPZ/b0/Kgzmf8eI UJyOexHm1iexaYunKnmlHcBLIAwm/og/P4VhVaWAgxTLVEDJMy4e9FP/izWS4pfIS1p0 ivFYlvztFLxPZNQaxcfmsCQpDiUwGObPyveNfovAuCbha4SRcaygkxnzdnr357qUrJSi rvBF31cWIZZkyC3yaMnIo7R5r1Yx7EXb8LMw5AOUiuR1wKhpZENWG3s7C1IoeU0A1kyb /fCypyKC+nwqhVX5yMBc89ohK54dsdFm+Mjpz5BaYEaSdbckUxWIK7/xtwqcswXltCHg kQqw== MIME-Version: 1.0 X-Received: by 10.43.158.197 with SMTP id lv5mr21929869icc.88.1417936552547; Sat, 06 Dec 2014 23:15:52 -0800 (PST) In-Reply-To: <141206215911.ZM16010@torch.brasslantern.com> 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> <141206215911.ZM16010@torch.brasslantern.com> Date: Sun, 7 Dec 2014 08:15:52 +0100 Message-ID: Subject: Re: Interrupting globs (Re: Something rotten in tar completion) From: Mikael Magnusson To: Bart Schaefer Cc: "Zsh Hackers' List" Content-Type: text/plain; charset=UTF-8 On Sun, Dec 7, 2014 at 6:59 AM, Bart Schaefer wrote: > Or we could do this, which stops the matcher-list and completer loops > (and any tag loops or the like that are also in play) and then does > the rest of _main_complete as usual: > > diff --git a/Completion/Base/Core/_main_complete > b/Completion/Base/Core/_main_complete > index 91b68fe..5c4e368 100644 > --- a/Completion/Base/Core/_main_complete > +++ b/Completion/Base/Core/_main_complete > @@ -126,13 +126,14 @@ fi > > _completer_num=1 > > -# We assume localtraps to be in effect here ... > -integer SECONDS=0 > -TRAPINT TRAPQUIT() { > +# We assume localtraps and no_localloops to be in effect here ... > +float SECONDS=0 > +trap ' > zle -M "Killed by signal in ${funcstack[1]} after ${SECONDS}s"; > zle -R > + repeat 1 break 10000 # break out of any reasonable number of loops > return 130 > -} > +' INT QUIT > > # Call the pre-functions. shortloops is not in _comp_options, so this needs to be repeat 1; do break 10000; done, if you go with this one. -- Mikael Magnusson