Skip to content

Instantly share code, notes, and snippets.

@bltavares
Created August 10, 2011 01:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bltavares/1135811 to your computer and use it in GitHub Desktop.
Save bltavares/1135811 to your computer and use it in GitHub Desktop.
Git Bash prompt
__ps1_plus(){
PS1='[\[\e[1;31m\]\@\[\e[0m\]][\[\e[1;35m\]\u@\h ~> \[\e[1;36m\]\w\[\e[0m\]]\$ \[$(tput setaf 4)$(tput bold)\]$(__git_ps1 "(%s) ")\[$(tput sgr0)\]'
}
[ -z "$PS1" ] && return
GIT_PS1_SHOWDIRTYSTATE=true
#GIT_PS1_SHOWSTASHSTATE=true
GIT_PS1_SHOWUNTRACKEDFILES=true
GIT_PS1_SHOWUPSTREAM=true
export PROMPT_COMMAND=__ps1_plus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment