diff options
| author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-11-03 17:42:50 +0100 | 
|---|---|---|
| committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-11-03 17:42:50 +0100 | 
| commit | d9a8d6f268a3c0bbf9e24da0737d4af9abbadec0 (patch) | |
| tree | cdc2a0a353d0a8f9d7f06a28f9f2aaf499c7f6b6 | |
| parent | bcfcca89fbe9c195988b46b554472cf871540856 (diff) | |
still parse status info if the command failed
| -rwxr-xr-x | bin/extra/supd | 14 | 
1 files changed, 7 insertions, 7 deletions
| diff --git a/bin/extra/supd b/bin/extra/supd index c7e4e8c..9a5ce0c 100755 --- a/bin/extra/supd +++ b/bin/extra/supd @@ -20,19 +20,19 @@ do  	(  	cd "$dir" || return      # is git dir -    git rev-parse > /dev/null 2>&1 || return -	printf '%s: ' "$dir" | >&2 sed "s#$HOME#~#" -    if git "${1:-fetch}" > /dev/null 2>&1 +    if ! git rev-parse > /dev/null 2>&1      then -        printf 'o' -    else          printf 'x\n' -        return +        exit      fi +	printf '%s: ' "$dir" | >&2 sed "s#$HOME#~#" +    git "${1:-fetch}" > /dev/null 2>&1 && +        printf 'o' || +        printf 'x'      # Show remote state      printf ' %s%s\n' "$(git status --short 2> /dev/null |          awk 'NR==1 {print "(" $1 ")"}')" "$(git branch -v 2>/dev/null |          awk -F '[][]' '/^\*/ {print $2}' | -        sed 's/ahead/↑ /;s/behind/↓ /;s/[^↓↑]*/ /g')" +        sed 's/ahead/↑ /;s/behind/↓ /;s/[^↓↑]*//g')"  	)  done | 
