diff options
| author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-07-11 21:42:14 +0200 | 
|---|---|---|
| committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-07-11 21:43:51 +0200 | 
| commit | 6251d6ba1054cd79387f0f88ce25d2f4bc8b78c4 (patch) | |
| tree | 03b8a7db0b97dcf50de4f2307b4f186e0203c278 /bin/common/gt-st | |
| parent | 7be67a67ea8406e357f84693f02d86cc64fe077c (diff) | |
checkpoint
Diffstat (limited to 'bin/common/gt-st')
| -rwxr-xr-x | bin/common/gt-st | 8 | 
1 files changed, 6 insertions, 2 deletions
| diff --git a/bin/common/gt-st b/bin/common/gt-st index 98184b9..43443cd 100755 --- a/bin/common/gt-st +++ b/bin/common/gt-st @@ -14,11 +14,15 @@ if [ ! -d "$repo" ]; then  fi  # replace line with status -status="$(git -C "$repo" status  --porcelain 2>/dev/null | +status="$(git -C "$repo" status --porcelain 2>/dev/null |  	awk '{print $1}' |  	sort | uniq | tr -s '?' |  	tr -d '\n')"  remote="$(git -C "$repo" branch -v 2>/dev/null |  	sed '/^*/!d;s/ahead/↑/;s/behind/↓/;s/[^↓↑]*//g')" -printf '%s %s %s\n' "$repo_pretty" "$status" "$remote" +if [ "$status" ] || [ "$remote" ]; then +	printf '%s: \033[0;31m%s %s\033[0m\n' "$repo_pretty" "$status" "$remote" +else +	printf '%s\n' "$repo_pretty" +fi | 
