我的系统的 git 自动补全非常好,但缺少至少git difftool和git diffmerge. 我的意思是,如果我git diff<TAB>在提示符下输入,我会得到以下内容:
$ 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
看?没有difftool或diffmerge那里。我必须将它们全部输入到最后才能使用它们,或者创建一些我不想要的 git 别名。
有没有办法修补默认的 git 完成配置以添加对这两个命令的支持?默认的 git 完成脚本在哪里?我可以修改它,或者更好的是,用我自己的.zshrc或其他东西修补它,这样我就不必弄乱系统原来的东西了?
如果有人想知道,我在 Mac Lion 上使用 zsh 4.3.11 并安装了最新的 oh-my-zsh。我的 git 是从 homebrew 安装的,它的版本是 1.8.0.1。