Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Install Zsh
# Install zsh
brew install zsh
# Set zsh as your default shell
chsh -s /usr/local/bin/zsh
Install Terminal Profile
- You can go to osx-terminal-theme and download your favorite theme. But, I use the theme from: https://github.com/sindresorhus/terminal-snazzy.
- Double click the downloaded “xxx.terminal” or right-click on the file and select Open with > Terminal
- Open Terminal > Preferences > Text and select the “xxx” theme and click on “Default” button
Install oh-my-zsh
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Install Themes
brew tap homebrew/cask-fonts
brew install --cask font-fira-code
Change your font settings in the Terminal to Fira Code.
brew install starship
echo 'eval "$(starship init zsh)"' >> ~/.zshrc
Install on-my-zsh plugins
autojump
brew install autojump
Add the plugin to the list of plugins for oh-my-zsh to load (inside ~/.zshrc).
plugins=(
# other plugins...
autojump
)
zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
Add the plugin to the list of plugins for oh-my-zsh to load (inside ~/.zshrc).
plugins=(
# other plugins...
zsh-syntax-highlighting
)
zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
Add the plugin to the list of plugins for oh-my-zsh to load (inside ~/.zshrc).
plugins=(
# other plugins...
zsh-autosuggestions
)
Reference
English
- https://tonyxu.io/posts/2018/ultimate-way-to-beautify-mac-terminal-and-recommendations-for-plugins/
- https://opensource.com/article/20/8/iterm2-zsh
- https://towardsdatascience.com/the-ultimate-guide-to-your-terminal-makeover-e11f9b87ac99
- https://starship.rs/faq/#what-is-the-configuration-used-in-the-demo-gif
- https://www.freecodecamp.org/news/jazz-up-your-bash-terminal-a-step-by-step-guide-with-pictures-80267554cb22/
Chinese
- https://medium.com/@jinghua.shih/mac-setup-%E8%AE%93%E4%BD%A0%E7%9A%84%E9%96%8B%E7%99%BC%E9%80%9F%E5%BA%A6%E5%A4%A7%E8%BA%8D%E9%80%B2-cd07fa327aaf
- https://medium.com/%E6%95%B8%E6%93%9A%E4%B8%8D%E6%AD%A2-not-only-data/macos-%E7%9A%84-terminal-%E5%A4%A7%E6%94%B9%E9%80%A0-iterms-oh-my-zsh-%E5%85%A8%E6%94%BB%E7%95%A5-77d5aae87b10
- https://medium.com/statementdog-engineering/prettify-your-zsh-command-line-prompt-3ca2acc967f