- 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