Created
January 4, 2010 11:13
-
-
Save hmans/268464 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
# awesome git-enabled prompt | |
function parse_git_branch { | |
ref=$(git-symbolic-ref HEAD 2> /dev/null) || return | |
echo "("${ref#refs/heads/}")" | |
} | |
export PS1='\[\033[00;32m\]\u \[\033[00;35m\]\w\[\033[00m\]\[\033[00;33m\]`git branch 2>/dev/null|cut -f2 -d\* -s` \[\033[00m\]\$ ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment