zsh
macOS Catalina自带zsh
ly@linfengxudeMacBook-Pro ~ % echo $SHELL
/bin/zsh
Oh My Zsh
官网下载,需要git
ly@linfengxudeMacBook-Pro ~ % sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
powerkevek10k
➜ ~ git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/themes/powerlevel10k
Set ZSH_THEME="powerlevel10k/powerlevel10k" in ~/.zshrc.
设置配色
p10k configure
❯ vim ~/.p10k.zsh
安装插件
zsh-syntax-highlighting
# 克隆
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
# ~/.zshrc 中配置
plugins=(zsh-syntax-highlighting)
zsh-autosuggestions
# 克隆
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
# ~/.zshrc 中配置
plugins=(zsh-autosuggestions)
启用插件
vim ~/.zshrc
plugins=(git ...)