Last active
August 29, 2015 14:14
-
-
Save meoso/ca3838d0d84b4215ccf8 to your computer and use it in GitHub Desktop.
basic errorcode enabled bash prompt
This file contains hidden or 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
#for ~/.bashrc | |
DULL=0 | |
FG_RED=31 | |
FG_GREEN=32 | |
ESC="\033" | |
NORMAL="\[$ESC[m\]" | |
RED="\[$ESC[${DULL};${FG_RED}m\]" | |
GREEN="\[$ESC[${DULL};${FG_GREEN}m\]" | |
PS1="$NORMAL \$(if [[ \$? == 0 ]]; then echo \"$GREEN\342\234\223\"; else echo \"$RED\342\234\227\"=\$?; fi) $NORMAL\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w \$ " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
looks like: (but with green ✓ and red ✗=)