Skip to content

Instantly share code, notes, and snippets.

@rocketraman
Created April 1, 2014 00:18
Show Gist options
  • Save rocketraman/9905217 to your computer and use it in GitHub Desktop.
Save rocketraman/9905217 to your computer and use it in GitHub Desktop.
Git-based (contrib) prompt
GRN="\[\e[32m\]"
YLW="\[\e[33m\]"
BLU="\[\e[34m\]"
PNK="\[\e[35m\]"
NOc="\[\033[0m\]"
source /usr/share/git-core/contrib/completion/git-prompt.sh
PROMPT_COMMAND='__git_ps1 "$GRN\u@\h $YLW\w$NOc" " $YLW\\\$$NOc "'
export GIT_PS1_SHOWDIRTYSTATE=1
export GIT_PS1_SHOWSTASHSTATE=1
export GIT_PS1_SHOWCOLORHINTS=1
export GIT_PS1_SHOWUNTRACKEDFILES=1
export GIT_PS1_SHOWUPSTREAM="auto verbose"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment