From 41609925d25c4938928f9807f1bb00474bc44814 Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Sun, 15 Dec 2019 11:07:27 +0100 Subject: [PATCH] chg: dev: clean color definition !minor Removing obsolete/unused color variables Signed-off-by: Valentin Lab --- bin/compose | 48 +++++------------------------------------------- 1 file changed, 5 insertions(+), 43 deletions(-) diff --git a/bin/compose b/bin/compose index f638009..ebe50b8 100755 --- a/bin/compose +++ b/bin/compose @@ -15,7 +15,6 @@ ## From kal-shlib ## -ANSI_ESC=$'\e[' hash_get() { if get_path sha256sum >/dev/null; then @@ -73,22 +72,9 @@ ansi_color() { fi fi - if [ "$choice" != "no" ]; then - - SET_COL_CHAR="${ANSI_ESC}${COL_CHAR}G" - SET_COL_STATUS="${ANSI_ESC}${COL_STATUS}G" - SET_COL_INFO="${ANSI_ESC}${COL_INFO}G" - SET_COL_ELT="${ANSI_ESC}${COL_ELT}G" - - SET_BEGINCOL="${ANSI_ESC}0G" + ANSI_ESC=$'\e[' - UP="${ANSI_ESC}1A" - DOWN="${ANSI_ESC}1B" - LEFT="${ANSI_ESC}1D" - RIGHT="${ANSI_ESC}1C" - - SAVE="${ANSI_ESC}7" - RESTORE="${ANSI_ESC}8" + if [ "$choice" != "no" ]; then NORMAL="${ANSI_ESC}0m" @@ -110,23 +96,8 @@ ansi_color() { DARKCYAN="${ANSI_ESC}0;36m" DARKWHITE="${ANSI_ESC}0;37m" - SUCCESS=$GREEN - WARNING=$YELLOW - FAILURE=$RED - NOOP=$BLUE - ON=$SUCCESS - OFF=$FAILURE - ERROR=$FAILURE - else - SET_COL_CHAR= - SET_COL_STATUS= - SET_COL_INFO= - SET_COL_ELT= - - SET_BEGINCOL= - NORMAL= RED= GREEN= @@ -142,24 +113,15 @@ ansi_color() { DARKBLUE= DARKPINK= DARKCYAN= - - SUCCESS= - WARNING= - FAILURE= - NOOP= - ON= - OFF= - ERROR= + DARKWHITE= fi ansi_color="$choice" - export SET_COL_CHAR SET_COL_STATUS SET_COL_INFO SET_COL_ELT \ - SET_BEGINCOL UP DOWN LEFT RIGHT SAVE RESTORE NORMAL \ - GRAY RED GREEN YELLOW BLUE PINK CYAN WHITE DARKGRAY \ + export NORMAL GRAY RED GREEN YELLOW BLUE PINK CYAN WHITE DARKGRAY \ DARKRED DARKGREEN DARKYELLOW DARKBLUE DARKPINK DARKCYAN \ - SUCCESS WARNING FAILURE NOOP ON OFF ERROR ansi_color + DARKWHITE SUCCESS WARNING FAILURE NOOP ON OFF ERROR ansi_color }