For years my shell prompt was a peacock. Battery, time, hostname colour-coded by environment, a little Python version badge, the lot. It looked tremendous in screenshots and told me almost nothing I actually needed at the moment I needed it. This year I stripped it back to four things, and the difference to my error rate is real enough that I want to write it down.
The four are: git branch and dirty state, current kube context, the exit code of the last command when it isn't zero, and a path that's been shortened so the bit I care about is visible. That's it. Everything else was decoration, and decoration on a prompt is a cost, because every glyph competes for the half-second of attention you spend before pressing return.
The kube context one has saved me from genuine disasters. I run a fair amount of kubectl across clusters, and the gap between staging and production is one apply away from a bad evening. Having the context painted into the prompt, red when it's anything with "prod" in the name, means I cannot pretend I didn't know. I switched to starship this autumn to manage all this, mostly because I was tired of maintaining my own zsh functions, and its config is just a TOML file:
[kubernetes]
disabled = false
format = '[$context](bold red) '
[git_status]
format = '([$all_status$ahead_behind]($style) )'
[directory]
truncation_length = 3
truncate_to_repo = true
The exit-code rule matters more than it looks. I only show the code when it's non-zero, so a clean prompt genuinely means the last thing worked. If the failure indicator were always present, I'd stop seeing it, the way you stop hearing a fan. Silence carries the signal; noise only appears when something's wrong.
The git dirty marker is the oldest habit and still the one I'd miss most. A single character that tells me there are uncommitted changes is the difference between a clean branch switch and that sinking "oh, those were on the wrong branch" feeling. I don't need the file count. I need to know there's something, so I pause.
If there's a principle here it's that a prompt is a heads-up display, not a status page. A HUD shows you the two or three things that change your next action and hides everything else until it matters. I had it backwards for the better part of a decade. The quiet version is the one I trust.