內容#
- 安裝 zsh:
sudo apt-get install zsh
。 - 配置 zsh 為預設終端
chsh -s /bin/zsh
,配置後重啟可生效。 - 安裝 oh-my-zsh:
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):
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, 『 安裝 & 配置 』 - 知乎