xChar
·3 months ago
  1. 更新软件源并安装zsh和基本依赖
# 更新软件源
sudo apt update && sudo apt upgrade -y
# 安装 zsh git curl wget
sudo apt install zsh git curl wget -y
  1. 设置默认终端为 zsh(若你使用Deepin终端需要手动配置)
chsh -s /bin/zsh

image

  1. 安装Oh My Zsh
# 官方源
sh -c "$(wget -O- https://install.ohmyz.sh/)"
# 国内镜像
sh -c "$(wget -O- https://gitee.com/pocmon/ohmyzsh/raw/master/tools/install.sh)"
  1. 安装haoomz主题
sudo wget -O $ZSH_CUSTOM/themes/haoomz.zsh-theme https://cdn.haoyep.com/gh/leegical/Blog_img/zsh/haoomz.zsh-theme
  1. 启用haoomz主题
nano ~/.zshrc
## 更改主题
ZSH_THEME="haoomz"

source ~/.zshrc

image

  1. 安装命令预测插件zsh -autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
  1. 安装命令校验插件zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
  1. 更改配置文件以启用插件
nano ~/.zshrc

plugins=(
  git
  zsh-autosuggestions
  zsh-syntax-highlighting
)

source ~/.zshrc

image

  1. 大功告成

image

image

image

image

Loading comments...