Created
October 15, 2012 15:58
-
-
Save leejunkit/3893263 to your computer and use it in GitHub Desktop.
My Bash .profile script for the pretty colored 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
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/' | |
} | |
#set the sudo bash prompt | |
export SUDO_PS1="\[\e[0;93;41m\][\u] \w \$\[\e[0m\] " | |
#set the normal bash prompt | |
export PS1="\[\e[0;92m\][\u]\[\e[m\] \[\e[0;35m\]\w \[\e[0;96;44m\]\$(parse_git_branch)\[\e[0;32m\]\$\[\e[m\] " | |
#enable pretty colors | |
export CLICOLOR=1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment