Created
December 22, 2014 15:19
-
-
Save mbbroberg/af32f8dff5fc59bba87a to your computer and use it in GitHub Desktop.
Fun bash prompts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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: | |
http://www.reddit.com/r/programming/comments/697cu/bash_users_what_do_you_have_for_your_ps1/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment