diff --git a/src/bee-list.sh.in b/src/bee-list.sh.in index 3ab4c88..c15f9d7 100644 --- a/src/bee-list.sh.in +++ b/src/bee-list.sh.in @@ -80,7 +80,11 @@ function usage() { } function config_init_colors() { - if [ -t 1 ] ; then + : ${BEE_COLOR:="yes"} + if [ ! -t 1 ] ; then + BEE_COLOR="no" + fi + if [ "${BEE_COLOR}" != "no" ] ; then COLOR_NORMAL="\\033[0;39m\\033[0;22m" COLOR_GREEN="\\033[0;32m" COLOR_YELLOW="\\033[0;33m" @@ -105,9 +109,9 @@ function config_init_colors() { COLOR_PURPLE="" COLOR_BRACKET="" COLOR_BRCONTENT="" - COLOR_INFO="**INFO** " - COLOR_ERROR="**ERROR** " - COLOR_WARN="**WARNING** " + COLOR_INFO="" + COLOR_ERROR="" + COLOR_WARN="" COLOR_INSTALLABLE="installable " COLOR_UPDATABLE=" updatable " fi diff --git a/src/beelib.config.sh.in b/src/beelib.config.sh.in index 5d03b66..e0b5d45 100644 --- a/src/beelib.config.sh.in +++ b/src/beelib.config.sh.in @@ -26,7 +26,11 @@ : ${BEE_BINDIR:=@BINDIR@} function config_init_colors() { - if [ -t 1 ] ; then + : ${BEE_COLOR:="yes"} + if [ ! -t 1 ] ; then + BEE_COLOR="no" + fi + if [ "${BEE_COLOR}" != "no" ] ; then COLOR_NORMAL="\\033[0;39m\\033[0;22m" COLOR_GREEN="\\033[0;32m" COLOR_YELLOW="\\033[0;33m" @@ -49,9 +53,9 @@ function config_init_colors() { COLOR_PURPLE="" COLOR_BRACKET="" COLOR_BRCONTENT="" - COLOR_INFO="**INFO** " - COLOR_ERROR="**ERROR** " - COLOR_WARN="**WARNING** " + COLOR_INFO="" + COLOR_ERROR="" + COLOR_WARN="" fi } @@ -359,6 +363,7 @@ function config_init() { config_load_local_config config_load_user_config config_load_system_config + config_init_colors config_verify_builtin_config config_verify_builtin_prefixes config_handle_deprecated_config diff --git a/src/beesh.sh.in b/src/beesh.sh.in index 5f8acd4..543910e 100644 --- a/src/beesh.sh.in +++ b/src/beesh.sh.in @@ -916,7 +916,7 @@ while true ; do esac done -config_init_colors +config_init echo -e "${COLOR_CYAN}BEE v${BEE_VERSION} 2009-2016" echo -e " by Marius Tolzmann " @@ -924,8 +924,6 @@ echo -e " Matthias Ruester " echo -e " Tobias Dreyer " echo -e "${COLOR_NORMAL}" -config_init - config_set_skiplist print_info " BEE_SKIPLIST ${BEE_SKIPLIST}"