linux_mac_centos_ubuntu install zsh

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

  1. installation
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
  1. Configuration
    Add zsh-syntax-highlighting to plugins of ~/.zshrc

2 Auto-completion plugin

  1. installation
git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
  1. Configuration
    Add zsh-autosuggestions to the plugins of ~/.zshrc

Reference

CentOS install oh-my-zsh and configure syntax highlighting and command auto-completion

Guess you like

Origin blog.csdn.net/sdlypyzq/article/details/112865662
zsh