Created
April 4, 2013 03:36
-
-
Save openfly/5307489 to your computer and use it in GitHub Desktop.
A cool bash shell prompt that displays emoticons that match up to exit status of last ran command.
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
#!/bin/bash | |
function __RETURN_CODE { | |
RETCODE=$? | |
case $RETCODE in | |
0) RETSTR=" 😈 " ;; | |
1) RETSTR=" 😭 " ;; | |
2) RETSTR=" 😱 " ;; | |
*) RETSTR=" 🐵 $RETCODE " ;; | |
esac | |
} | |
PROMPT_COMMAND='__RETURN_CODE' | |
PS1=" [ \$RETSTR ] \$ " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment