esm,
@esm@beehaw.org avatar

There are two usability tweaks that I would find it hard to live without: (1) red prompt on last-command failure, and (2) highlight what I type, dehighlight output:

https://beehaw.org/pictrs/image/7e2edd8d-6e98-4c8b-bc0d-2b046146ce92.webp

Reason for 1 is obvious, 2 is more subtle: it helps my eye scan scrollback and identify what I’ve typed, which is what I’m scanning for 90% of the time.

Implementations vary, here’s how I do it in zsh:

  1. PS1='%(?.%K{cyan}%F{white}.%B%K{red}%F{white})XX%b%k%f %(?.%F{cyan}.%F{red})yyy%k%b%F{yellow}%(!.#.$)%f '. Duplication is evil, but AFAIK necessary because the conditional (error check) is %(? and I highlight both parts of my two-part prompt. Suggestions welcome for removing the duplication.
  2. zle_highlight=(“default:fg=white”) (on a Solarized Dark term, where the default fg color is light gray. Adjust to fit your needs).
  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • uselessserver093
  • Food
  • [email protected]
  • aaaaaaacccccccce
  • test
  • CafeMeta
  • testmag
  • MUD
  • RhythmGameZone
  • RSS
  • dabs
  • oklahoma
  • Socialism
  • KbinCafe
  • TheResearchGuardian
  • Ask_kbincafe
  • SuperSentai
  • feritale
  • KamenRider
  • All magazines