Created
May 13, 2010 23:44
-
-
Save rgrove/400636 to your computer and use it in GitHub Desktop.
My custom git-aware shell prompt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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