Install Zsh
安装 Zsh
先下载 Zsh 的压缩包,解压后,放到 Git Bash 的安装目录,默认是 C:\Program Files\Git\
目录。
安装 ohmyzsh
sh
git clone https://mirrors.tuna.tsinghua.edu.cn/git/ohmyzsh.git
cd ohmyzsh/tools
nvim install.sh
# open install.sh and revise REMOTE accordingly
# REMOTE=https://mirrors.tuna.tsinghua.edu.cn/git/ohmyzsh.git
sh install.sh
下载 powerlevel10k 主题
sh
git clone --depth=1 https://gitee.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
在 ~/.zshrc
设置 ZSH_THEME="powerlevel10k/powerlevel10k"
。接下来,重新打开一个新的终端,终端会自动引导你配置 powerlevel10k 主题。
把 Zsh 集成到 Windows Terminal
这里的内容待补充。
安装插件
sh
git clone https://github.moeyy.xyz/https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.moeyy.xyz/https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
启用插件
修改 ~/.zshrc
中插件列表为:
sh
plugins=(git zsh-autosuggestions zsh-syntax-highlighting z extract web-search)
其中有两个是上面刚刚安装,其他则为 Zsh 内置插件。