Skip to content
  1. Install and set up zsh as default
  2. Install oh-my-zsh
shell
# From Github
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
# Or From Gitee
sh -c "$(https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh)"

The installation files are located in the path ~/.oh-my-zsh, and the configuration entry point is the ~/.zshrc file.

  1. Configure iTerm2

Open iTerm2 => Settings => Profiles => Colors => Color Presets => Import Ayu Mirage

  1. Configure ZSH

Install zsh theme,

shell
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k

Edit ~/.zshrc,

text
ZSH_THEME="powerlevel10k/powerlevel10k"

Restart iTerm2, and enter command,

shell
p10k configure

Install zsh plugins,

shell
# Install auto-suggestion
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
# Install syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

Edit ~/.zshrc,

text
plugins=( 
    # other plugins...
    zsh-autosuggestions
    zsh-syntax-highlighting
    # other plugins...
)
  1. Install FIG

IDE-style autocomplete for your existing terminal.