环境:Ubuntu 20.04
使用zsh
sudo apt-get install zsh
sudo chsh -s $(which zsh)
安装oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
使用agnoster主题
vim ~/.zshrc
// 修改如下行
// 修改前
ZSH_THEME="robbyrussell"
// 修改后
ZSH_THEME="agnoster"
安装zsh-autosuggestions和zsh-syntax-highlighting
git clone git://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
echo "source ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
vim ~/.zshrc
// 修改如下行
// 修改前
plugins=(git)
// 修改后
plugins=(git zsh-autosuggestions zsh-syntax-highlighting)