美文网首页科技
Tips: 如何让MAC的git可以通过Tab自动补全

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

作者: 郭少悲 | 来源:发表于2017-06-08 15:42 被阅读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

相关文章

网友评论

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

    本文链接:https://www.haomeiwen.com/subject/ructqxtx.html