Anthony Foster

Terminal Mac OS X

And copy this into your
.profile
file, which adds the git branch suffix.
export CLICOLOR='Yes'
export LSCOLORS=DxFxCxDxBxegedBaagacad

function parse_git_branch {
	ref=$(git symbolic-ref HEAD 2> /dev/null) || return
	echo "("${ref#refs/heads/}") "
}

PS1="\[\e[0;33m\]\W \[\e[1;34m\]\$(parse_git_branch)\[\e[0m\]\$ "

plain() {
	# Disable colors:
	export LSCOLORS=''
	export CLICOLOR=''
	# OS X default:
	PS1='\h:\W \u\$ '
}

	
blog comments powered by Disqus