Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 8 function parse_git_dirty {
- 9 [[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
- 10 }
- 11
- 12 function parse_git_branch {
- 13 git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/"
- 14 }
- 15
- 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