Guest User

Untitled

a guest
Jan 24th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.36 KB | None | 0 0
  1. source ~/.git-completion.sh
  2.  
  3. git_status() {
  4.     if git status | grep 'Changes to be committed' > /dev/null
  5.     then
  6.         echo "[☠]"
  7.     fi
  8. }
  9.  
  10. git_prompt_info() {
  11.   branch_prompt=$(__git_ps1)
  12.   if [ -n "$branch_prompt" ]; then
  13.     status_icon=$(git_status)
  14.     echo $branch_prompt$status_icon
  15.   fi
  16. }
  17.  
  18. export PS1="\u@\h \W\$(git_prompt_info)$ "
Add Comment
Please, Sign In to add comment