终端中执行以下命令,并选择默认 Shell 为 Zsh:
$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
$ chsh -s /bin/zsh
下载插件 zsh-autosuggestions
和 zsh-syntax-highlighting
,注意需要在 Zsh 下面执行:
$ git clone git://github.com/zsh-users/zsh-autosuggestions $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
下载主题 p10k,注意需要在 Zsh 下面执行:
$ git clone https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k
修改配置文件 .zshrc:
ZSH_THEME="powerlevel10k/powerlevel10k"
POWERLEVEL9K_MODE="awesome-patched"
plugins=(git zsh-autosuggestions zsh-syntax-highlighting)
完成上述更改后,执行 source ~/.zshrc
。