Skip to content

Instantly share code, notes, and snippets.

@4lberto
Created May 31, 2017 21:25
Show Gist options
  • Save 4lberto/2181a28335837e3322c6a0acd64a286a to your computer and use it in GitHub Desktop.
Save 4lberto/2181a28335837e3322c6a0acd64a286a to your computer and use it in GitHub Desktop.
Change the prompt in mac
# Git branch in prompt.
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\[\033[1;36m\]\t\[\033[00m\] [\w]\033[0;37m\]\$(parse_git_branch)\[\033[00m\] $ "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment