下载脚本
curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash
修改.bash_profile
if [ -f ~/.git-completion.bash ]; then
. ~/.git-completion.bash
fi
测试验证
source ~/.bash_profile
$ git tab
检查输出结果,是否可以做到git 命令补全
参考
https://apple.stackexchange.com/questions/55875/git-auto-complete-for-branches-at-the-command-line
网友评论