Skip to content

Instantly share code, notes, and snippets.

@bulseeyeLF
Last active April 16, 2018 12:46
Show Gist options
  • Save bulseeyeLF/0a3093a390d9d4ea282e02c6e90e3362 to your computer and use it in GitHub Desktop.
Save bulseeyeLF/0a3093a390d9d4ea282e02c6e90e3362 to your computer and use it in GitHub Desktop.
parse_git_branch() {
git branch 2> /dev/null | sed -E '/^[^*]/d' -E 's/* \(.*\)/ (\1)/'
}
export PS1="export PS1="\u [\A] - \w \$(parse_git_branch)\n\\$\[$(tput sgr0)\]"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment