Bench notes

Short technical field notes on systems weirdness

05 Feb 2026

My custom bash prompt is nearly 5 years old

A small milestone, and a quiet test of whether my approach holds up: I’ve been using mostly the same custom Bash prompt for nearly five years.

Demonstrating custom bash prompt

The prompt lives in my dotfiles repository and is installed via GNU Stow (./tool install modules/bash). No fancy deployment, no host-specific glue. If a machine has Bash, Perl, and GNU Stow, it works.

The prompt itself is dynamic, though not fragile! It’s built from two pieces:

The DEBUG trap records the command start time and also updates the xterm window title, so the currently running command is visible at all times.

The PROMPT_COMMAND does the rest.

The prompt shows:

  1. “ssh” in yellow when I’m on a remote host (a subtle yet important guard rail)
  2. Execution time for the last command, if it exceeds five seconds
  3. Exit status code for the last command
  4. Active Python virtualenv, by folder name
  5. The usual user, host, cwd, and $ vs # for regular user vs root

It’s fast, boring, legible.

Five years later and I still don’t possess an urge to replace it. That’s the highest compliment I can afford for any piece of infrastructure.