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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章