Open Gorthog opened 1 year ago
The response from wttr.in contains a number of ANSI escape sequences not supported by coloroma.
Withhttp wttr.in --pretty format
or even http wttr.in --pretty none
, the escape sequences are processed by Windows Terminal and the colors appear as expected, but not in Command Prompt due to VT100 being disabled by default. I don't know how curl works around it.
As Windows Terminal will be the default command line for future Windows, I think it's reasonable to support it only and not Command Prompt. However, why by default http wttr.in
does not show all colors on Windows Terminal? Is it limitation of colorma on Windows?
Yes, colorama supports these ANSI sequences. However, response from wttr contains many unsupported ones (e.g. 38, 208, 214, 226). I think, the purpose of having colorama is to support Windows Console? Windows Terminal supports them by default. Maybe further detecting conhost and only then using colorama is a good solution.
Checklist
Minimal reproduction code and steps
Current result
widget have no colors
Expected result
widget have colors
Debug output
Please re-run the command with
--debug
, then copy the entire command & output and paste both below:Additional information, screenshots, or code examples
http vs curl![image](https://user-images.githubusercontent.com/15230040/187092932-cd12d2d3-7e92-4dd5-9170-c1f8775d3277.png)
also on WSL, http works as expected.