Mys*_*ode 3 git bash autocomplete
我最近安装了git.我正在使用Ubuntu 14.04.但是,自动完成功能无效.
每当我键入git i那么TAB它应该是git init,但它并没有这样发生.我已尝试过本页提到的所有内容,但仍未成功.
每当我做git in那么TAB它似乎像Git是执行ping主机不明.以下是截图:
我该如何解决这个问题?
Cod*_*ard 12
将此脚本用于Ubuntu:
https://github.com/git/git/blob/master/contrib/completion/git-completion.bash
阅读有关如何设置的文档:
To use these routines:
1) Copy this file to somewhere (e.g. ~/.git-completion.bash).
2) Add the following line to your .bashrc/.zshrc:
source ~/.git-completion.bash
3) Consider changing your PS1 to also show the current branch,
see git-prompt.sh for details.
Run Code Online (Sandbox Code Playgroud)
更短的解决方案:
# install the bash-completion vai apg-get
sudo apt-get install git bash-completion
Run Code Online (Sandbox Code Playgroud)