Skip to content

Instantly share code, notes, and snippets.

@nfekete
Last active June 15, 2018 23:06
Show Gist options
  • Save nfekete/41046b51a88355047e4538062d5013df to your computer and use it in GitHub Desktop.
Save nfekete/41046b51a88355047e4538062d5013df to your computer and use it in GitHub Desktop.
.bashrc snippet that sets up a git aware color prompt with xterm window title support
export GIT_PS1_SHOWDIRTYSTATE=true
export GIT_PS1_SHOWCOLORHINTS=true
#PS1='[\u@\h \W$(__git_ps1 " (%s)")]\$ '
#export PROMPT_COMMAND='__git_ps1 "\u@\h:\w" "\\\$ "'
export PROMPT_COMMAND='\
__git_ps1 "\[\033]0;\u@\h: \w\007\]\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]" "\\\$ "\
'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment