Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: git completion horribly slow in kernel tree



On Tue, Jan 22, 2008 at 11:22:22AM -0500, Clint Adams wrote:
> 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.56
diff -u -r1.56 _git
--- Completion/Unix/Command/_git	22 Jan 2008 16:44:10 -0000	1.56
+++ Completion/Unix/Command/_git	22 Jan 2008 17:03:26 -0000
@@ -2655,7 +2655,7 @@
   integer at_least_one_tree_added
   local -a tree_files
 
-  Path=${1:h}/
+  [[ "$1" == */ ]] && Path="$1" || Path="${1:h}/"
   shift
   (( at_least_one_tree_added = 0 ))
   for tree in $*; do



Messages sorted by: Reverse Date, Date, Thread, Author