1.安装bash-completion
安装命令:
brew install bash-completion
安装完后查看:
brew info bash-completion
将[[ -r “/usr/local/etc/profile.d/bash_completion.sh” ]] && . “/usr/local/etc/profile.d/bash_completion.sh” 添加到.bash_profile,然后重启终端 bash-completion部分安装完毕
2.拷贝、设置.git-completion.sh路径
访问https://github.com/git/git
找到”contrib/completion/”目录下的git-completion.bash
然后复制git-completion.bash文件内容,在~/目录下新建.git-completion.bash 文件,然后在~/.bashrc 文件内加入source ~/.git-completion.bash
终端输入 source ~/.git-completion.bash
将if [ -f ~/.git-completion.bash ]; then . ~/.git-completion.bash fi 添加到~/.bash_profile
完成
© 版权声明
文章版权归作者所有,未经允许请勿转载。
相关文章
暂无评论...


