mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-11-01 08:50:19 +00:00
Default to $TERM unset = colour on Win32
This otherwise respects all other configuration
(NO_COLOR, TERM=dumb, &c.), but it's very common for the environment to
be lacking TERM, which in that case usually means a pro-verbial
TERM=cmd.exe, which is colourful
Fixes: 049d1138c9 ("Don't output colours
by default if TERM=dumb or NO_COLOR=1")
This commit is contained in:
1 parent
69c91f5b2d
commit
af2f0ace22
1 file changed
+1
-1
+1
-1
@@ -300,7 +300,7 @@ impl Options {
|
||||
OutputStyleOption::Basic
|
||||
} else if env::var_os("TERM")
|
||||
.map(|t| t == "unknown" || t == "dumb")
|
||||
.unwrap_or(true)
|
||||
.unwrap_or(!cfg!(target_os = "windows"))
|
||||
|| env::var_os("NO_COLOR")
|
||||
.map(|t| !t.is_empty())
|
||||
.unwrap_or(false)
|
||||
|
||||
Reference in new issue
Block a user