From 49eeb4a2981e6da640e0273aa988e81a6969a371 Mon Sep 17 00:00:00 2001 From: zimbatm Date: Sun, 17 Apr 2022 13:38:00 +0200 Subject: [PATCH] stdlib.sh: remove dependency on tput tput is not portable. See https://github.com/dylanaraps/pure-bash-bible#escape-sequences --- stdlib.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/stdlib.sh b/stdlib.sh index 691fb79bb..a692d2150 100755 --- a/stdlib.sh +++ b/stdlib.sh @@ -152,10 +152,8 @@ log_status() { # log_error "Unable to find specified directory!" log_error() { - local color_normal - local color_error - color_normal=$(tput sgr0) - color_error=$(tput setaf 1) + local color_normal="\e[m" + local color_error="\e[38;5;1m" if [[ -n $DIRENV_LOG_FORMAT ]]; then local msg=$* # shellcheck disable=SC2059,SC1117