Skip to content

Instantly share code, notes, and snippets.

@mklabs
Created August 17, 2016 11:26
Show Gist options
  • Save mklabs/c8a21a22995df75dc9c046444463187e to your computer and use it in GitHub Desktop.
Save mklabs/c8a21a22995df75dc9c046444463187e to your computer and use it in GitHub Desktop.
bash git prompt
. /etc/bash_completion.d/git-prompt
export GIT_PS1_SHOWDIRTYSTATE=1 GIT_PS1_SHOWSTASHSTATE=1 GIT_PS1_SHOWUNTRACKEDFILES=1
export GIT_PS1_SHOWUPSTREAM=verbose GIT_PS1_DESCRIBE_STYLE=branch
export PS1='\[$(tput bold)\]\[\033[38;5;10m\]\u@\h\[$(tput sgr0)\]\[\033[38;5;15m\]:\[$(tput sgr0)\]\[\033[38;5;6m\]\w\[$(tput sgr0)\]\[\033[38;5;15m\]$(__git_ps1 " (%s)")\\$\[$(tput sgr0)\] \[$(tput sgr0)\]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment