From 1f3f83506c91699f599f72e91543cf5def299ced Mon Sep 17 00:00:00 2001
From: "Hahn Axel (hahn)" <axel.hahn@iml.unibe.ch>
Date: Fri, 18 Feb 2022 12:43:34 +0100
Subject: [PATCH] add function cecho

---
 inc_bash.sh | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/inc_bash.sh b/inc_bash.sh
index e75f16e..23e8b58 100755
--- a/inc_bash.sh
+++ b/inc_bash.sh
@@ -1,4 +1,8 @@
-
+# ======================================================================
+#
+# shared bash functions
+#
+# ======================================================================
 
 # ----------------------------------------------------------------------
 # returncodes
@@ -49,6 +53,15 @@ function fetchrc(){
     fi    
   }
 
+  # echo a colored text and reset color
+  # param  string  keyword to set a color - see function color() above
+  # param  string  text to show
+  function cecho(){
+    color $1
+    shift
+    echo $*
+    color reset
+  }
 
   function showPrompt(){
     color input
-- 
GitLab