aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmd/mbf/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/mbf/main.go')
-rw-r--r--cmd/mbf/main.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd/mbf/main.go b/cmd/mbf/main.go
index d464fd54..db6c1a0a 100644
--- a/cmd/mbf/main.go
+++ b/cmd/mbf/main.go
@@ -92,6 +92,11 @@ func main() {
var cm cache
defer func() { cm.Close() }()
+ if cm.color = ext.Isatty(syscall.Stderr) &&
+ os.Getenv("NO_COLOR") == "" &&
+ os.Getenv("TERM") != "dumb"; cm.color {
+ log.SetPrefix("\x1b[2mmbf: \x1b[0m")
+ }
var (
flagQuiet bool