From e65307d6d11f843750e6f539277803196d6f4c6a Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Wed, 30 Apr 2014 13:53:17 +0000 Subject: functions: only enable colors on terminals We dont want wolors enabled when output is a file or a pipe --- functions.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions.sh.in b/functions.sh.in index 719b354..4bdda5d 100644 --- a/functions.sh.in +++ b/functions.sh.in @@ -175,7 +175,7 @@ enable_colors() { BLUE="\033[1;34m" } -if [ -n "$USE_COLORS" ]; then +if [ -n "$USE_COLORS" ] && [ -t 1 ]; then enable_colors else disable_colors -- cgit v1.2.3