I have a problem with the zsh tab completion: After running:
autoload -U compinit
compinit
Git tab completion for files does not work any more. For example if I type git add my_f to complete my_file, nothing happens. The zsh git completion only seems to work for git branches and tags.
Without the compinit stuff, git file completion works, but of course I'm missing out all the fancy branch completion stuff.
So... Is there a way to make git file completion AND git branch completion possible at the same time in zsh? This would really help me a lot.
(I'm adding an answer here mostly to get it off the unanswered list.)
As you can see from the comments, it does work. I believe the whole zsh situation has recently improved significantly, too:
commit 06f44c3cc5ca5eca638f300a518c65aa98d26d6d
Date: Mon Sep 6 08:33:19 2010 -0400
completion: make compatible with zsh
Modify git-completion.bash so that it also works with zsh when using bashcompinit. ...
So, if you happen across this googling, and your completion isn't working, try upgrading your git-completion.bash (link points to the blob from git.git HEAD). Current git version is 1.7.3.2; it should make it into the next one.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With