Skip to content

Instantly share code, notes, and snippets.

@robballou
Created November 6, 2012 16:11
Show Gist options
  • Save robballou/4025722 to your computer and use it in GitHub Desktop.
Save robballou/4025722 to your computer and use it in GitHub Desktop.
Current Bash prompt stylings
# ---------------------------------------------------------------------
# colorize the prompt
# ---------------------------------------------------------------------
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \[\1\]/'
}
GREEN_BOLD="\[\e[32;1;32m\]"
CLEAR="\[\e[m\]"
YELLOW="\[\033[0;33m\]"
export PS1="\u:$GREEN_BOLD\W$CLEAR$YELLOW\$(parse_git_branch)$CLEAR \$ "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment