Guest User

Untitled

a guest
Jan 19th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. 8 function parse_git_dirty {
  2. 9 [[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
  3. 10 }
  4. 11
  5. 12 function parse_git_branch {
  6. 13 git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/"
  7. 14 }
  8. 15
  9. 16 PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\e[0;36m\]$(parse_git_branch)\[\033[00m\]\$ '
Add Comment
Please, Sign In to add comment