Why touch the prompt at all?
A good prompt tells you context — current directory, git branch, Python venv, last command status — without you having to ask. Three to five small facts keep your fingers from typing pwd, git status, and echo $? a hundred times a day.
Hand-rolled zsh prompt
setopt PROMPT_SUBST
autoload -U colors && colors
PROMPT='%F{cyan}%n%f@%m %~ %F{red}%(?..[%?] )%f%# '
RPROMPT='%F{8}%*%f'Username (cyan), host, working dir, exit code only when non-zero (red), prompt char. Right side: clock.
Starship — the modern default
Cross-shell, fast (Rust), opinionated good defaults. Install:
brew install starship
echo 'eval "$(starship init zsh)"' >> ~/.zshrcStarship auto-detects git status, language versions, k8s context, AWS profile, command duration. Customize via ~/.config/starship.toml; presets ship with one-line copy commands.
Powerlevel10k — zsh-only, blazing fast
P10k has the slickest first-time wizard (p10k configure) and an instant-prompt feature that shows the prompt before the rest of zsh finishes loading. zsh-only, but if you live in zsh, it's stunning.
Async / instant-prompt
Both Starship and P10k render the static parts immediately, then update git/Python info asynchronously. That's why a slick prompt can still feel instant — the slow bits aren't blocking your typing.
A prompt executes code after every command
Repeated Git and network queries can make the prompt itself the bottleneck in large repositories or slow mounts. Measure each display component and bound its work. Fast, correct state beats maximum information.
Do not encode critical state with color alone
Fonts, color vision, and remote terminal settings can break symbols. Show text labels and hostnames for production or remote context, then confirm with a dedicated command before acting.