-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Supporting FORCE_COLOR as an alias to CLICOLOR_FORCE #192
Comments
https://force-color.org/ is new to me. I've seen btw we already support A big question is how to handle the interaction of 3 different standards. At least |
Thanks, https://force-color.org/ (the website) was relatively new to me as well. I decided to propose this issue given python started considered it canonical in their docs and thought it was probably worthy to consider support for it here as it would help projects like For what it's worth python just checks for the mere presence of the environment var, and other tools are notionally similar but differ in what exactly they search for and how they use it in context of the other variables. I don't see a standard on how all of them interact and I'm not sure there will ever be one. For this project specifically, I was trying to align I wish the was a better way to gather metrics on usage, but at a glance it does seem at least on Github that |
When I was weighing what to build-in, I was less interested in how wide spread something is about how consistently its expected to be implemented. People can always build their own thing on top but I didn't feel like arbitrating between parties arguing over 3 different implementations. |
In donatj/force-color.org#30 I bring up the discrepancies. We'll see how that goes... |
Thanks for bringing up the discrepancies ❤️ |
## Summary Closes #3955 Adds explicit support to `NO_COLOR` and `FORCE_COLOR` via GlobalSettings. The order, per specs is now `NO_COLOR` > `FORCE_COLOR` > `color`. This PR is a backup plan pending rust-cli/anstyle#192. ## Test Plan Tested all cases locally for now; I didn't see existing tests for GlobalSettings parsing.
Is this resolved, if not how can I help? |
As originally reported in astral-sh/uv#3955, it seems both https://force-color.org/ and https://no-color.org/ are becoming adopted community standards.
Python's 3.13 docs shows an example usage of both https://docs.python.org/3.13/using/cmdline.html#controlling-color.
It would be ideal if
anstyle
can supportFORCE_COLOR
in addition toCLICOLOR_FORCE
to force color support.I believe there should be no functional changes beyond supporting an additional environment variable check to the existing
clicolor_force
function inanstyle-query
crate.NO_COLOR
would still take precedence overFORCE_COLOR
.The text was updated successfully, but these errors were encountered: