Allow Windows users to opt into color support
pie-flavor opened this issue · 3 comments
Please complete the following tasks
- I have searched the discussions
- I have searched the existing issues
Clap Version
2.33.3
Describe your use case
Clap currently automatically disables coloring support on Windows because Windows has not historically supported ANSI color codes and clap doesn't feel like using crossterm instead. However, the current version of Windows does support ANSI codes, and furthermore statically linking the MSVCRT on the current version will let the built binary support colors on prior versions. I am on the current version of Windows, so I would like to be able to use the coloring support Clap already has.
Describe the solution you'd like
Add an opt-in feature force-colors
that will prevent auto-disabling ANSI colors on Windows.
Alternatives, if applicable
Use an arbitrary cfg flag instead, so that only the binary's build environment can set it and not their dependencies.
Additional Context
No response
This should be addressed in master / v3. We switched to termcolor.
I hadn't seen that, great! However, it would be great if this behavior was back ported to v2 as well, which would probably take the shape I described.
My understanding is we're only backporting critical fixes. To put in context, its been over a year since the last commit to v2-master
.