使用Homebrew安装

$ brew install bash-completion
#####安装完成之后######
$ brew info bash-completion  
#####下边执行#######
==> Caveats
Add the following lines to your ~/.bash_profile:
if [ -f $(brew –prefix)/etc/bash_completion ]; then
. $(brew –prefix)/etc/bash_completion
fi