Message ID | 20190222040652.5058-1-iff@escondida.tk |
---|---|
State | Accepted, archived |
Headers | show |
Series | term_colors.sh: do not use colors on a dumb term | expand |
diff --git a/lib/term_colors.sh b/lib/term_colors.sh index a675247..87e95ee 100644 --- a/lib/term_colors.sh +++ b/lib/term_colors.sh @@ -1,6 +1,6 @@ # check if messages are to be printed using color unset ALL_OFF BOLD BLUE GREEN RED YELLOW -if [[ -t 2 && ! $USE_COLOR = "n" ]]; then +if [[ -t 2 && ! $USE_COLOR = "n" && ! $TERM = "dumb" ]]; then # prefer terminal safe colored and bold text when tput is supported if tput setaf 0 &>/dev/null; then ALL_OFF="$(tput sgr0)"