0 Install zsh and oh-my-zsh
# 查看当前shell
echo $SHELL
# 安装zsh
## centos
sudo yum install zsh
## ubuntu
sudo apt install zsh
# 查看zsh
which zsh
# 更换sh
# chsh -s /usr/bin/zsh
chsh -s /bin/zsh
# clone from github
git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
# 复制默认.zshrc
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
1 Syntax highlighting plugin
- installation
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
- Configuration
Add zsh-syntax-highlighting to plugins of ~/.zshrc
2 Auto-completion plugin
- installation
git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
- Configuration
Add zsh-autosuggestions to the plugins of ~/.zshrc
Reference
CentOS install oh-my-zsh and configure syntax highlighting and command auto-completion