Created
March 16, 2009 18:22
-
-
Save leehambley/79984 to your computer and use it in GitHub Desktop.
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
# From the GitHub guide | |
parse_git_branch() { | |
branch=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'` | |
if [ "$branch" = "(master)" ] ; then | |
branch="$(tput setaf 1)${branch}$(tput sgr0)" | |
elif [ "$branch" != '' ] ; then | |
branch="${branch}" | |
fi | |
echo $branch | |
} | |
# Pretty Prompt... | |
# http://thinkingdigitally.com/archive/sweet-black-terminal-theme-for-osx-leopard/ | |
export PS1='\[\033[01;31m\]\h \[\033[01;34m\]\W\n \$ $(parse_git_branch)\[\033[00m\]→ ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment