Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. # color branch github
  2. function parse_git_branch () {
  3. git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
  4. }
  5. RED="\[\033[01;31m\]"
  6. YELLOW="\[\033[01;33m\]"
  7. GREEN="\[\033[01;32m\]"
  8. BLUE="\[\033[01;34m\]"
  9. NO_COLOR="\[\033[00m\]"
  10.  
  11. PS1="$GREEN\u@\h$NO_COLOR:$BLUE\w$YELLOW\$(parse_git_branch)$NO_COLOR\$ "
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement