Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: git completion horribly slow in kernel tree
- X-seq: zsh-workers 24437
- From: Clint Adams <clint@xxxxxxx>
- To: Mikael Magnusson <mikachu@xxxxxxxxx>
- Subject: Re: git completion horribly slow in kernel tree
- Date: Tue, 22 Jan 2008 11:22:22 -0500
- Cc: zsh-workers@xxxxxxxxxx
- In-reply-to: <237967ef0801211740s1ee07850vc25984a7af262cac@xxxxxxxxxxxxxx>
- Mail-followup-to: Mikael Magnusson <mikachu@xxxxxxxxx>, zsh-workers@xxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <slrnfongql.jes.joerg@xxxxxxxxxxxx> <237967ef0801141339p73414915xc411253211ed7467@xxxxxxxxxxxxxx> <20080122011932.GB16813@xxxxxxxxxxx> <237967ef0801211740s1ee07850vc25984a7af262cac@xxxxxxxxxxxxxx>
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:<tab> will
> list all dirs and files, but HEAD:D<tab> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author