Last active
December 27, 2015 11:39
-
-
Save tylorr/7320077 to your computer and use it in GitHub Desktop.
.bash_profile additions
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
export PROMPT_COMMAND=__prompt_command | |
# color coded | |
# red blue green yellow | |
# [errnum] username@hostname dir | |
# $ | |
function __prompt_command() { | |
local EXIT="$?" | |
PS1="\n" | |
if [ $EXIT != 0 ]; then | |
PS1+="\[\e[1;31m\]$EXIT\[\e[m\] " | |
fi | |
PS1+="\[\e[36m\]\u\[\e[m\]@\[\e[32m\]\h\[\e[m\] \[\e[33;1m\]\w\[\e[m\]\n\$ " | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment