From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19207 invoked by alias); 4 Dec 2014 17:15:43 -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: 33842 Received: (qmail 6948 invoked from network); 4 Dec 2014 17:15:31 -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=XGlNrcdNZgWROqIMLXIA:9 a=CjuIK1q_8ugA:10 Resent-from: Bart Schaefer Resent-message-id: <141204091522.ZM9159@torch.brasslantern.com> Resent-date: Thu, 04 Dec 2014 09:15:22 -0800 X-Mailer: OpenZMail Classic (0.9.2 24April2005) Resent-to: zsh-workers@zsh.org From: Bart Schaefer Message-id: <141204085606.ZM9146@torch.brasslantern.com> Date: Thu, 04 Dec 2014 08:56:06 -0800 In-reply-to: <20141202172654.30e7d380@pwslap01u.europe.root.pri> Comments: In reply to Peter Stephenson "Re: Something rotten in tar completion" (Dec 2, 5:26pm) References: <20141202155452.647182b4@pwslap01u.europe.root.pri> <141202084858.ZM31517@torch.brasslantern.com> <20141202172654.30e7d380@pwslap01u.europe.root.pri> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: "Zsh Hackers' List" Subject: Re: Something rotten in tar completion Cc: Peter Stephenson MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Dec 2, 5:26pm, Peter Stephenson wrote: } } Turns out it was recursive-files. I had that set for my "src" } subdirectory, which was a bit daft since it's got to search through any old } clutter to find a completion for a bare file name. Removing that } removes the wait. } } Would still be nice to be able to kill it... In the most recent _main_complete, the message on the interrupt should tell you where it was: trap 'zle -M "Killed by signal in ${funcstack[1]} after ${SECONDS}s"; Getting that $funcstack name might be helpful. In the meantime, it does not seem useful to regenerate the recursive listing for every directory in the recursive-files style: diff --git a/Completion/Unix/Type/_files b/Completion/Unix/Type/_files index 0f6fcd6..049b49c 100644 --- a/Completion/Unix/Type/_files +++ b/Completion/Unix/Type/_files @@ -121,9 +121,11 @@ for def in "$pats[@]"; do if _path_files -g "$pat" "$opts[@]" "$expl[@]"; then ret=0 elif [[ $PREFIX$SUFFIX != */* ]] && zstyle -a ":completion:${curcontext}:$tag" recursive-files rfiles; then + local subtree + subtree=( **/*(/) ) for rfile in $rfiles; do if [[ $PWD/ = ${~rfile} ]]; then - for prepath in **/*(/); do + for prepath in $subtree; do oprefix=$PREFIX PREFIX=$prepath/$PREFIX _path_files -g "$pat" "$opts[@]" "$expl[@]" && ret=0 -- Barton E. Schaefer