Skip to content

Instantly share code, notes, and snippets.

@TerribleDev
Created December 14, 2018 12:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TerribleDev/d656a01ea15d6d2f61b588ec63472283 to your computer and use it in GitHub Desktop.
Save TerribleDev/d656a01ea15d6d2f61b588ec63472283 to your computer and use it in GitHub Desktop.
put exit codes in shell
# Custom bash prompt via kirsle.net/wizards/ps1.html
export PS1="\[$(tput bold)\]\$?|\[$(tput setaf 1)\][\[$(tput setaf 3)\]\u\[$(tput setaf 2)\]@\[$(tput setaf 4)\]\h \[$(tput setaf 5)\]\W\[$(tput setaf 1)\]]\[$(tput setaf 7)\]\\$ \[$(tput sgr0)\]"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment