dotfiles

*nix config files
git clone git://git.pyratebeard.net/dotfiles.git
Log | Files | Refs | README

prompt_git_info (386B)


      1 if [ -n "$__CURRENT_GIT_BRANCH" ]; then
      2     local s="-["
      3     s+="$__CURRENT_GIT_BRANCH"
      4     case "$__CURRENT_GIT_BRANCH_STATUS" in
      5         ahead)
      6         s+="↑"
      7         ;;
      8         diverged)
      9         s+="↕"
     10         ;;
     11         behind)
     12         s+="↓"
     13         ;;
     14     esac
     15     if [ -n "$__CURRENT_GIT_BRANCH_IS_DIRTY" ]; then
     16         s+="⚡"
     17     fi
     18     s+="]"
     19  
     20     printf "%s%s" $s
     21 fi