Please enable Javascript to view the contents
CentOS 7 下安装并配置 Zsh
1. 安装 zsh
1
| sudo yum install -y zsh
|
2. 安装 oh-my-zsh
1
| sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
|
建议将 Zsh 设置为默认的 Shell。
3. 安装插件
3.1 安装 autojump
1
| sudo yum install -y epel-release
|
1
| sudo yum install -y autojump-zsh
|
3.2 安装 zsh-autosuggestions
1
| git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
|
3.3 安装 zsh-syntax-highlighting
1
| git clone git://github.com/zsh-users/zsh-syntax-highlighting $ZSH_CUSTOM/plugins/zsh-syntax-highlighting
|
4. 添加 .zshrc
配置
1
| sed -i 's/^plugins=(\(.*\)/plugins=(autojump zsh-autosuggestions zsh-syntax-highlighting \1/' ~/.zshrc
|
退出 Terminal, 再次登录即可。