ohmyzsh
centos/rhel下安装命令
➜ ~ yum install zsh
➜ ~ yum install git
➜ ~ sh -c "\$(wget <https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh> -O -)"
Ubuntu下安装命令
sudo apt-get update
sudo apt-get install zsh
历史命令自动补全插件
- Clone this repository somewhere on your machine. This guide will assume ~/.zsh/zsh-autosuggestions.
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions
- Add the following to your .zshrc:
source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
- Start a new terminal session.
高亮显示插件
git clone git://github.com/zsh-users/zsh-syntax-highlighting $ZSH_CUSTOM/plugins/zsh-syntax-highlighting
- mkdir -p ~/.zsh
- 把从github上下载的包解压到~/.zsh
- source ./zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
插件需要环境设置命令固化到.zshrc脚本中