Skip to content

Instantly share code, notes, and snippets.

@jayers99
Created December 23, 2018 19:11
Show Gist options
  • Save jayers99/bafe20b72ff4b8ab2f830e598f88f1b4 to your computer and use it in GitHub Desktop.
Save jayers99/bafe20b72ff4b8ab2f830e598f88f1b4 to your computer and use it in GitHub Desktop.
#export PS1="\e[0;32m[\\u@\h:\\W]\$ \e[m"
#export PS1="\e[1;32m\\u@\h\e[m:\e[1;34m\\W\e[m\$ "
#export PS1="\[\033[01;32m\]\u@\h\[\033[0m\]:\[\033[01;34m\]\W\[\033[0m\]\$ "
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\[\033[00;33m\]\u@\h\[\033[0m\]:\[\033[01;34m\]\w\[\033[00;32m\]\$(parse_git_branch)\[\033[0m\]\n\[\033[00;33m\]> $\[\033[0m\] "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment