Created
September 17, 2009 20:07
-
-
Save krbullock/188679 to your computer and use it in GitHub Desktop.
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
kbullock@x-134-84-64-185 15:06:11 | |
~ ❧ false | |
☹ kbullock@x-134-84-64-185 15:06:31 | |
~ ❧ true | |
kbullock@x-134-84-64-185 15:10:41 | |
~ ❧ | |
# De ugly, ugly code what duz it: | |
# start with basics | |
PS1='\u@\h \t $(__hg_ps1)'$'\n''\w '$'\xe2\x9d\xa7 ' | |
# prepend the frowny-face for non-zero exit status | |
PS1='`if [ \$? != 0 ];then echo "\[\e[31m\]'$'\xe2\x98\xb9''\[\e[0m\] ";fi`'$PS1 | |
# add a newline at the beginning so the prompt doesn't eat output | |
PS1=$'\n'$PS1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment