Skip to content

Instantly share code, notes, and snippets.

@rgrove
Created May 13, 2010 23:44
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 rgrove/400636 to your computer and use it in GitHub Desktop.
Save rgrove/400636 to your computer and use it in GitHub Desktop.
My custom git-aware shell prompt
# Pretty git-aware shell prompt.
case $TERM in
xterm*)
TITLEBAR='\[\033]0;\u@\h:\w\007\]'
;;
*)
TITLEBAR=""
;;
esac
export GIT_PS1_SHOWDIRTYSTATE=1
export PS1="${TITLEBAR}\[\033[1;32m\]\u@\h\[\033[0;0m\]:\[\033[1;34m\]\w\[\033[0;0m\]\[\033[1;36m\]\$(__git_ps1 "[%s]")\[\033[0;0m\]\$ "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment