安裝 Zsh:
# Ubuntu/Debian
sudo apt install zsh
# macOS
brew install zsh
安装配置框架 Oh My Zsh:
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
-
安装插件 zsh-syntax-highlighting:
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
在
~/.zshrc
中激活插件:plugins=( [其他 plugin...] zsh-syntax-highlighting) # zsh-syntax-highlighting 必须放在最后
-
安装插件 zsh-autosuggestions:
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions