Skip to content

Instantly share code, notes, and snippets.

@wayneeseguin
Created September 10, 2010 20:17
Show Gist options
  • Select an option

  • Save wayneeseguin/574297 to your computer and use it in GitHub Desktop.

Select an option

Save wayneeseguin/574297 to your computer and use it in GitHub Desktop.
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/[\1]/'
}
PS1="\u@\h \w \$(parse_git_branch)$ "
if [[ -f ~/.bashrc ]] ; then source ~/.bashrc ; fi
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment