Created
June 18, 2010 15:05
-
-
Save jzellman/443748 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
function current_branch(){ | |
BR=$(git symbolic-ref HEAD 2>/dev/null | awk -F/ '{ print "<" $3 ">" } ') || { echo "$@" ; exit ; } | |
echo " $BR" | |
} | |
export PS1='\[\e[32;1m\]\u@\h \[\e[34;1m\]\w\[\e[36;1m\]$(current_branch)\[\e[0;30m\]\[\e[0m\]$ ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment