科技

Tips: 如何让MAC的git可以通过Tab自动补全

2017-06-08  本文已影响5人  郭少悲

下载脚本

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
上一篇 下一篇

猜你喜欢

热点阅读