在 Mac
终端下,我们都会想要按 tab
就出现指令的自动补全,可以安装bash-completion
达到对应的目的。
bash-completion
brew install bash-completion
Add bash-completion to your ~/.bash_profile:
[ -f /usr/local/etc/bash_completion ] && . /usr/local/etc/bash_completion
zsh
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
~/.zshrc
plugins=(
...
zsh-autosuggestions
)
/usr/local/share/zsh/site-functions