跳转至

centos7安装zsh

安装zsh

yum install -y zsh

切换默认shell

chsh -s /bin/zsh

安装oh-my-zsh

# github源
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
# gitee源
sh -c "$(curl -fsSL https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh)"

安装自动补全插件

git clone <https://github.com/zsh-users/zsh-autosuggestions> $ZSH_CUSTOM/plugins/zsh-autosuggestions

plugins=(git)处添加自动补全插件:

plugins=(
    git
    zsh-autosuggestions
)