My system's git autocompletion is pretty good, but lacks completion of at least git difftool
and git diffmerge
. I mean that if I type git diff<TAB>
on my prompt what I get is the following:
$ g diff<TAB>
diff -- show changes between commits, commit and working tree, etc.
diff-files -- compare files in the working tree and the index
diff-index -- compare content and mode of blobs between index and repository
diff-stages -- compare two "merge states" in the index file
diff-tree -- compare the content and mode of blobs found via two tree objects
See? No difftool
or diffmerge
there. I have to type them all over to the end in order to use them, or create some git alias, which I don't want.
Is there a way to patch the default git completion configuration to add support for these two commands? Where is the default git completion script? Can I modify it, or better yet, patch it in my own .zshrc
or something so I don't have to mess up with the system original?
In case someone wants to know, I'm using zsh 4.3.11 on Mac Lion with the latest oh-my-zsh installed as well. My git is installed from homebrew and it's version 1.8.0.1.