summaryrefslogtreecommitdiff
path: root/giteval
diff options
context:
space:
mode:
authorDavid Wührer <def@gmx.at>2023-04-07 19:25:03 +0200
committerDavid Wührer <def@gmx.at>2023-04-07 19:25:03 +0200
commitdc3b063ef6b370d1b3594ed785c682ea2db09b41 (patch)
treec9f8facefd38f8163e53a08db3b632784b95ce92 /giteval
parentbe555f29f47f81993c12bf76065a0cb6bb0fee96 (diff)
Add a few incomplete things
Diffstat (limited to 'giteval')
-rwxr-xr-xgiteval15
1 files changed, 15 insertions, 0 deletions
diff --git a/giteval b/giteval
new file mode 100755
index 0000000..c4e8d08
--- /dev/null
+++ b/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[$b]\e[0m"
+ ;; 'no changes added to commit'*)
+ printf "\e[33m[$b]\e[0m"
+ ;; 'nothing added to commit'*)
+ printf "\e[36m[$b]\e[0m"
+ ;; *)
+ printf "\e[31m[$b]\e[0m"
+ esac
+}
+echo