Mac 終端zsh美化

  1. Mac內置了zsh
  2. 安裝ohmyzsh
    sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
    
  3. 安裝字體
brew tap homebrew/cask-fonts
brew cask install font-hack-nerd-font
  1. 安裝主題powerlevel10k
git clone https://github.com/romkatv/powerlevel10k.git ~/.oh-my-zsh/custom/themes/powerlevel10k
  1. 設置主題 vi ~/.zshrc ZSH_THEME="powerlevel10k/powerlevel10k"

  2. 設置zsh終端字體 終端-偏好設置

  1. 運行source ~/.zshrc會讓你選擇一些配置,根據實際情況選擇 p10k configure重新配置命令

  1. vscode設置字體。設置爲Hack Nerd Font

  2. 安裝 autosuggestions。按方向鍵右可快速選擇

git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
vi ~/.zshrc
 # 在文件裏找到plugins,添加 
plugins=(
  git
  zsh-autosuggestions
)


source ~/.zshrc
  1. 因爲mac默認使用的zsh。所以加環境變量需要加到.zshrc文件中
  2. 加速https://developer.aliyun.com/mirror/homebrew
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章