Skip to content

Instantly share code, notes, and snippets.

@tarto-dev
Last active August 29, 2015 14:05
Show Gist options
  • Select an option

  • Save tarto-dev/78d45cbc6dfc3ee4334e to your computer and use it in GitHub Desktop.

Select an option

Save tarto-dev/78d45cbc6dfc3ee4334e to your computer and use it in GitHub Desktop.
Promp with Git
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
export PS1="\[\e[00;32m\]\A\[\e[0m\]\[\e[00;37m\] \[\e[0m\]\[\e[01;33m\]\u\[\e[0m\]\[\e[00;37m\]@\[\e[0m\]\[\e[00;33m\]\h\[\e[0m\]\[\e[01;32m\]:\[\e[0m\]\[\e[00;36m\][\w]:\[\e[0m\]\[\e[00;37m\]\[\e[0m\] \[\033[1;32m\]\$(parse_git_branch)\[\033[0;37m\] \\$ "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment