Skip to content

Instantly share code, notes, and snippets.

@leejunkit
Created October 15, 2012 15:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leejunkit/3893263 to your computer and use it in GitHub Desktop.
Save leejunkit/3893263 to your computer and use it in GitHub Desktop.
My Bash .profile script for the pretty colored prompts
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