1. Install homebrew
2. Install Git and bash-completion: brew install git bash-completion
(Note: If this install fails with a 404 error, and you already have git installed, just remove the git part of this brew install)
在我电脑上已经安装了git,现在只需要安装bash-completion即可,执行如下命令
uxiaolei@duxiaoleideMacBook-Pro:~$brew install bash-completion Updating Homebrew... ==> Auto-updated Homebrew! Updated 1 tap (bazelbuild/tap). ==> Updated Formulae bazelbuild/tap/bazel ==> Downloading https://homebrew.bintray.com/bottles/bash-completion-1.3_3.high_sierra.bottle.tar.gz ######################################################################## 100.0% ==> Pouring bash-completion-1.3_3.high_sierra.bottle.tar.gz ==> Caveats Add the following line to your ~/.bash_profile: [[ -r "/usr/local/etc/profile.d/bash_completion.sh" ]] && . "/usr/local/etc/profile.d/bash_completion.sh" Bash completion has been installed to: /usr/local/etc/bash_completion.d ==> Summary版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。