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

下载脚本

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
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容