Skip to content
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

Support FORCE_COLOR / NO_COLOR env vars #1141

Open
mjpieters opened this issue Nov 4, 2024 · 2 comments
Open

Support FORCE_COLOR / NO_COLOR env vars #1141

mjpieters opened this issue Nov 4, 2024 · 2 comments

Comments

@mjpieters
Copy link

mjpieters commented Nov 4, 2024

Please support the FORCE_COLOR and NO_COLOR environment variables as alternative to the--color CLI switch.

The start-up behaviour then would be:

  1. --color set: use this configuration.
  2. NO_COLOR set: treat as --color never
  3. FORCE_COLOR set: treat as --color always
  4. use the default --color auto.

I see typos uses anstyle, like uv, so this is a virtual duplicate of astral-sh/uv#3955, with NO_COLOR already working, and CLICOLOR_FORCE having the same effect as FORCE_COLOR.

@epage
Copy link
Collaborator

epage commented Nov 4, 2024

This is blocked on rust-cli/anstyle#192 as I'm not going to move forward like uv did in astral-sh/uv#3979 due to all of the open question related to FORCE_COLOR (see donatj/force-color.org#30). However, this shouldn't be blocking because CLICOLOR_FORCE exists.

@mjpieters
Copy link
Author

My PR interprets FORCE_COLOR the same way CLICOLOR_FORCE is interpreted: as non-empty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants