Git标签自动完成是无用的,可以关闭还是优化?

Git的标签自动完成对于小型项目很有用,但是我正在使用两个使用git的大型项目,而这些项目比没有用的更糟糕。每当我键入,说git添加表单< tab>,git需要20秒或更多时间才能找到该文件(在本例中为forms.py),在这个时间段内,我不能在终端中执行任何其他操作。有没有办法关闭自动完成功能,或以某种方式使其更快?
它不是git自动完成文件名,它是你的shell。你在做例如时有相同的延迟吗? “cat forms< tab>”?

看看这个帖子有类似的问题:

http://talkings.org/post/5236392664/zsh-and-slow-git-completion

这个帖子建议将以下内容添加到.zshrc中:

__git_files () { 
    _wanted files expl 'local files' _files     
}

编辑:这是这篇文章的原文

I found many posts relating complaints about how painfully slow git
auto-completion can be in large repositories. There were various
suggested patches and suggestions to load the latest zsh. Maybe one
of those things would work, but all I really want is for it to
complete the names of branches and files as they are in the file
system. I did not find any suggestions on how to get this behavior so
I figured it out for myself. I thought I would share this for anyone
who might benefit from it. I just added the following to my .zshrc
file:

06001

Now I can run git commands and get near instant completion while still
getting file completion similar to what ls would provide.

http://stackoverflow.com/questions/9810327/git-tab-autocompletion-is-useless-can-i-turn-it-off-or-optimize-it

本站文章除注明转载外,均为本站原创或编译
转载请明显位置注明出处:Git标签自动完成是无用的,可以关闭还是优化?