/prompt

bash prompt with exit status and git head

Primary LanguageShell

prompt

I want my bash prompt to include:

  • history number (apply with !number)
  • number of background jobs
  • hostname
  • working directory
  • exit status of last command (only if != 0: "Rule of Silence")
  • git head (only if in git tree)
  • git dirty status (I:index M:modified U:untracked)
  • effective UID

revise
bash prompt with exit status and git head


bg-jobs
flaw and fix for bg-jobs


  • New: locale independent

  • a version with ansi

  • a version with tput