Terminal

一、Oh My Posh

官方文档 📝

oh-my-posh

.zprofile 中添加以下内容:

# Oh-my-posh
eval "$(oh-my-posh init zsh --config $(brew --prefix oh-my-posh)/themes/amro.omp.json)"

更改 cache 位置,新建一个 ~/.cache 目录,oh-my-ppsh 会在这个目录下缓存一些文件:

mkdir ~/.cache

二、ZSH 自动补全

官方文档 📝

zsh-autosuggestions

安装 zsh-autosuggestions:

brew install zsh-autosuggestions

然后在~/.zprofile~/.zshrc中添加以下内容:

source $(brew --prefix)/share/zsh-autosuggestions/zsh-autosuggestions.zsh

三、ZSH 高亮

官方文档 📝

zsh-syntax-highlighting

安装 zsh-syntax-highlighting:

brew install zsh-syntax-highlighting

然后在~/.zprofile~/.zshrc中添加以下内容:

source $(brew --prefix)/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh