bin/git_prompt_status @ dbcbfa37f036

Update mutt/offlineimap.py

replaced sjl username with `whoami` for general purpose user detection
author fpischedda <francesco.pischedda@gmail.com>
date Tue, 02 Oct 2012 12:47:37 +0300
parents 1a4e4c34085d
children (none)
#!/usr/bin/env bash

INDEX=$(git status --porcelain 2> /dev/null)
STATUS=""


if $(echo "$INDEX" | grep '^UU ' &> /dev/null); then
    STATUS="C$STATUS"
fi

if $(echo "$INDEX" | grep '^.[MD] ' &> /dev/null); then
    STATUS="?$STATUS"
elif $(echo "$INDEX" | grep '^?? ' &> /dev/null); then
    STATUS="?$STATUS"
fi

if $(echo "$INDEX" | grep '^[AMDR]. ' &> /dev/null); then
    STATUS="!$STATUS"
fi

echo -n $STATUS