]> git.wh0rd.org Git - home.git/commitdiff
disable colors if logging
authorMike Frysinger <vapier@gentoo.org>
Sat, 20 Oct 2012 16:04:11 +0000 (12:04 -0400)
committerMike Frysinger <vapier@gentoo.org>
Sat, 20 Oct 2012 16:04:11 +0000 (12:04 -0400)
.bin/bash-colors

index b2182b4c2d3ac503268ac2bb810bd59bffb8824f..04c637682d3dd7f191f5003cf925a232f09d7b1d 100755 (executable)
@@ -10,6 +10,7 @@ if [[ $1 == "--env" ]] ; then
                NORMAL="\$'\e[0m'"
        )
        for c in "${colors[@]}" ; do
+               [[ -t 0 ]] || c="${c%=*}="
                echo "${c}"
        done