- Mac内置了zsh
- 安装ohmyzsh
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
- 安装字体
brew tap homebrew/cask-fonts
brew cask install font-hack-nerd-font
- 安装主题powerlevel10k
git clone https://github.com/romkatv/powerlevel10k.git ~/.oh-my-zsh/custom/themes/powerlevel10k
-
设置主题 vi ~/.zshrc
ZSH_THEME="powerlevel10k/powerlevel10k"
-
设置zsh终端字体
终端
-偏好设置
- 运行
source ~/.zshrc
会让你选择一些配置,根据实际情况选择p10k configure
重新配置命令
-
vscode设置字体。设置为
Hack Nerd Font
-
安装 autosuggestions。按方向键右可快速选择
git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
vi ~/.zshrc
# 在文件里找到plugins,添加
plugins=(
git
zsh-autosuggestions
)
source ~/.zshrc
- 因为mac默认使用的zsh。所以加环境变量需要加到.zshrc文件中
- 加速https://developer.aliyun.com/mirror/homebrew