zsh 基本配置

Content

安装 zsh：sudo apt-get install zsh。

配置 zsh 为默认终端 chsh -s /bin/zsh，配置后重启可生效。

安装 oh-my-zsh：

Copy
git clone https://gitee.com/mirrors/oh-my-zsh.git ~/.oh-my-zsh
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc

安装历史记录插件 (zsh-autosuggestions) 和高亮插件 (zsh-syntax-highlighting):

Copy
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

# 在 ~/zshrc 中检索 `plugin(xxx)` 这一行，然后在括号里添加上述两个插件的名字
zsh-autosuggestions zsh-syntax-highlighting
# 配置完成后重新 source ~/.zshrc 即可

Ref

Links:

配置 oh-my-zsh: Oh My Zsh, 『 安装 & 配置 』 - 知乎