Open Pietruszek opened 2 years ago
displays like that:
That is unfortunate. While I think the program at fault here is PowerShell (for providing such a strange default), I agree that we should attempt to solve this.
This issue can be mitigated either by disabling the coloring using the
--style
option or by using a different shell (Windows Terminal orcmd
),
... or by changing the background color, I guess...
Two attempts at solving this I could imagine are:
1. Making a color scheme that will work on both black and blue backgrounds
I'd be okay with this if we have any other ANSI 8-bit colors left...
Checking somehow if
hyperfine
is running in Powershell and choosing the colors based on that
Do you know a way how to do this?
I've reproduced the issue on a conhost.exe
with blue background and made a PR to change color scheme.
After https://github.com/sharkdp/hyperfine/issues/427 has been resolved there's now a default coloring scheme enabled for Windows.
And while it looks good in the
cmd
or the default color scheme for the Windows Terminal, in Powershell the background is blue. What that means for thehyperfine
's color scheme is that the below output:displays like that:
so some info (like the User and System times) is very hard to read and some (like the max times or the strings after "faster than") is exactly the same color as the background.
This issue can be mitigated either by disabling the coloring using the
--style
option or by using a different shell (Windows Terminal orcmd
), but considering that some users might be testinghyperfine
for their first time in regular Powershell it is quite bad UX-wise.Though I'm not really sure what can be done to fix this...
Two attempts at solving this I could imagine are:
hyperfine
is running in Powershell and choosing the colors based on thatBut at least the second option seems to be a dead end, since the Powershell instance running in Windows Terminal actually has a black background as a default...