Skip to content

Instantly share code, notes, and snippets.

@jmuspratt
Last active May 9, 2016 20:55
Show Gist options
  • Save jmuspratt/04b79b5ce335cfb7e1410c4d7a7af95c to your computer and use it in GitHub Desktop.
Save jmuspratt/04b79b5ce335cfb7e1410c4d7a7af95c to your computer and use it in GitHub Desktop.
# Add Git to Bash and customize PS1
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \1/'
}
export PS1="\n\[\e[90m\]————————————————————————————————————————————\[\e[m\]\n\w -\[\e[90m\]\$(parse_git_branch)\[\e[m\] \n$ "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment