From: Mike Frysinger Date: Sat, 20 Oct 2012 16:04:11 +0000 (-0400) Subject: disable colors if logging X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=b73f07c77bd3c6846db6337ed67a36c531df97fe;p=home.git disable colors if logging --- diff --git a/.bin/bash-colors b/.bin/bash-colors index b2182b4..04c6376 100755 --- a/.bin/bash-colors +++ b/.bin/bash-colors @@ -10,6 +10,7 @@ if [[ $1 == "--env" ]] ; then NORMAL="\$'\e[0m'" ) for c in "${colors[@]}" ; do + [[ -t 0 ]] || c="${c%=*}=" echo "${c}" done