[macOS] HomeBrew 自动补全命令参数
在 macOS 中使用 HomeBrew 安装的软件包竟然无法自动补全参数信息,难受。
比如:git push origin master
,除了git
能自动补全外,其它都不行。
解决办法:安装bash-completion
。
$ brew install bash-completion
将以下片段粘贴到~/.bash_profile
后面:
if [ -f $(brew --prefix)/etc/bash_completion ]; then
. $(brew --prefix)/etc/bash_completion
fi
重启终端,即可解决。