Skip to content

Instantly share code, notes, and snippets.

@JamesHagerman
Created August 4, 2015 22:20
Show Gist options
  • Save JamesHagerman/4f0f4e1b4d44a5302b71 to your computer and use it in GitHub Desktop.
Save JamesHagerman/4f0f4e1b4d44a5302b71 to your computer and use it in GitHub Desktop.
# Enables color for the prompt:
export TERM="xterm-color"
# Sets up git branch info in term prompt:
source ~/git-completion.bash
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\[\e[0;33m\]\u\[\e[0m\]@\[\e[0;32m\]\h\[\e[0m\]:\[\e[0;34m\]\w\[\e[0m\]\[\033[32m\]\$(parse_git_branch)\[\033[00m\]\$ "
alias .="open ."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment