Customize Your Shell Prompt and History
Install a fast, informative prompt that shows your Git branch and exit status, and tune your shell history so it's actually useful.
beginner12 minmacos · windows · linuxUpdated August 2026
#shell#zsh#powershell#terminal
Requirements
- Terminal access
Choose your platform
0/3 steps · 0%
01
Install Starship
bash
$ brew install starship02
Enable it in your shell
bash
$ echo 'eval "$(starship init zsh)"' >> ~/.zshrc$ source ~/.zshrcNote
macOS has used zsh as the default shell since Catalina. On bash, use starship init bash and ~/.bashrc instead.
03
Tune your history
~/.zshrc
HISTSIZE=10000SAVEHIST=10000setopt SHARE_HISTORYSuccess
A bigger, shared history means commands from one tab are searchable in every other open tab.
Troubleshooting
Starship uses glyphs from a Nerd Font, and your terminal's current font doesn't include them.
Install a Nerd Font (e.g. FiraCode Nerd Font) and set it as your terminal's font in its preferences.