终端美化(ZSH)
查看已经安装的shell
cat /etc/shells
安装zsh
brew install zsh
设置默认shell
chsh -s /bin/zsh
git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
配置zsh
vi ~/.zshrc
修改主题
ZSH_THEME="ys"
配置插件
cd .oh-my-zsh/plugins
zsh-syntax-highlighting语法高亮插件
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
zsh-autosuggestions记录输入命令插件
git clone https://github.com/zsh-users/zsh-autosuggestions.git
在.zshrc中修改配置
plugins=(其他插件 zsh-syntax-highlighting zsh-autosuggestions) # 注意空格隔开
source ~/.zshrc
报错
Error: Oh My Zsh can't be loaded from: bash. You need to run zsh instead # 退出终端重进