Skip to content

Instantly share code, notes, and snippets.

@miguelcostero
Created June 25, 2017 01:48
Show Gist options
  • Save miguelcostero/4b8736770bba2710f52993ae4e2bd146 to your computer and use it in GitHub Desktop.
Save miguelcostero/4b8736770bba2710f52993ae4e2bd146 to your computer and use it in GitHub Desktop.
custom bash prompt for linux rastafari
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
export PS1="\[\e[1;32m\][\u\[\e[1;33m\]@\[\e[1;31m\]\h]\[\e[1;33m\]: \[\e[1;37m\]\w\[\e[1;33m\] \$(parse_git_branch)\n\[\e[1;33m\]-> \[\e[0m\]"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment