Skip to content

Instantly share code, notes, and snippets.

Created December 22, 2014 15:19
What would you like to do?
Fun bash prompts
## Color green if last command successful, red otherwise
PS1="\[\`if [[ \$? = "0" ]]; then echo '\e[32m\h\e[0m'; else echo '\e[31m\h\e[0m' ; fi\`:\w\n\$
Explore more here:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment