From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9548 invoked from network); 22 Jan 2008 16:22:42 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.4 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 22 Jan 2008 16:22:42 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 29480 invoked from network); 22 Jan 2008 16:22:39 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 22 Jan 2008 16:22:39 -0000 Received: (qmail 10952 invoked by alias); 22 Jan 2008 16:22:36 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 24437 Received: (qmail 10934 invoked from network); 22 Jan 2008 16:22:36 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 22 Jan 2008 16:22:36 -0000 Received: from virusfilter.dotsrc.org (bifrost [127.0.0.1]) by spamfilter.dotsrc.org (Postfix) with ESMTP id 6B7268058F58 for ; Tue, 22 Jan 2008 17:22:23 +0100 (CET) Received: from acolyte.scowler.net (acolyte.scowler.net [216.254.112.45]) by bifrost.dotsrc.org (Postfix) with ESMTP for ; Tue, 22 Jan 2008 17:22:23 +0100 (CET) Received: by acolyte.scowler.net (Postfix, from userid 1000) id 734825C06B; Tue, 22 Jan 2008 11:22:22 -0500 (EST) Date: Tue, 22 Jan 2008 11:22:22 -0500 From: Clint Adams To: Mikael Magnusson Cc: zsh-workers@sunsite.dk Subject: Re: git completion horribly slow in kernel tree Message-ID: <20080122162222.GA503@scowler.net> Mail-Followup-To: Mikael Magnusson , zsh-workers@sunsite.dk References: <237967ef0801141339p73414915xc411253211ed7467@mail.gmail.com> <20080122011932.GB16813@scowler.net> <237967ef0801211740s1ee07850vc25984a7af262cac@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <237967ef0801211740s1ee07850vc25984a7af262cac@mail.gmail.com> User-Agent: Mutt/1.5.17 (2007-11-01) X-Virus-Scanned: ClamAV using ClamSMTP On Tue, Jan 22, 2008 at 02:40:03AM +0100, Mikael Magnusson wrote: > Hm maybe my disclaimer wasn't clear enough, the code doesn't actually work. > Specifically it doesn't complete anything after typing a partial > directory name after a sha1: expression, so git show HEAD: will > list all dirs and files, but HEAD:D won't complete to Doc. This helps with that case. Two things that are still broken are 1) suffix of completed directories is a space, not / 2) completion of dir/ won't work; you need to input the next letter first. Index: Completion/Unix/Command/_git =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_git,v retrieving revision 1.55 diff -u -r1.55 _git --- Completion/Unix/Command/_git 22 Jan 2008 01:33:40 -0000 1.55 +++ Completion/Unix/Command/_git 22 Jan 2008 16:16:24 -0000 @@ -2655,8 +2655,7 @@ integer at_least_one_tree_added local -a tree_files - Path=${1%/*}/ - [[ $Path = / ]] && Path=. + Path=${1:h}/ shift (( at_least_one_tree_added = 0 )) for tree in $*; do