Ramblings of an aging IT geek
← Ramblings of an aging IT geek
tooling

A Prompt That Tells Me What I Actually Need

I trimmed my shell prompt down to the four things I actually act on, and stopped pretending I read the rest.

A keyboard and a terminal

For years my shell prompt was a peacock. Battery, time, the full path, git branch, ahead/behind counts, a Python venv, a Kubernetes context, three Nerd Font glyphs I couldn't have named. It looked the part. I also wasn't reading most of it, because a prompt that shows everything shows nothing: your eye stops parsing it after the first week.

So I asked myself the only useful question. What do I actually act on, in the half second before I hit enter? The answer turned out to be small. The git branch, because pushing to the wrong one ruins an afternoon. The current Kubernetes context, because kubectl delete against prod instead of staging is a career event. The exit code of the last command, but only when it's non-zero. And a colour change when I'm root, because I want my hindbrain to flinch.

That's it. Everything else got cut. The path collapses to the last two segments. The clock left entirely, my terminal multiplexer already has one. The venv name went, because the Python binary on $PATH tells me what I need and never lies about it.

The result is quieter, and crucially the things that remain are now load-bearing. When the prompt turns red, I notice, because it isn't red for decoration the rest of the time. A prompt should be an instrument panel, not a dashboard demo. Show me the four gauges I'd act on and let the multiplexer keep the clock.