From 77cfffee6177fb0421fa0fce15d6a1875bde4816 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20W=C3=BChrer?= Date: Sat, 18 May 2024 21:04:34 +0200 Subject: manuals, sum-down, radix --- bin/giteval | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 bin/giteval (limited to 'bin/giteval') diff --git a/bin/giteval b/bin/giteval new file mode 100755 index 0000000..48d35a8 --- /dev/null +++ b/bin/giteval @@ -0,0 +1,15 @@ +#!/bin/bash + +b=$(git branch --show-current 2> /dev/null) && { + case $(env - git status --no-ahead-behind | tail -n1) in + 'nothing to commit'*) + printf '\[\e[32m\][%s]\[\e[0m\]' "$b" + ;; 'no changes added to commit'*) + printf '\[\e[33m\][%s]\[\e[0m\]' "$b" + ;; 'nothing added to commit'*) + printf '\[\e[36m\][%s]\[\e[0m\]' "$b" + ;; *) + printf '\[\e[31m\][%s]\[\e[0m\]' "$b" + esac +} +echo -- cgit v1.2.3