Supporting FORCE_COLOR as an alias to CLICOLOR_FORCE
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 171
- Forks
- 44
- Avg merge
- 2h 34m
- Merged PRs (30d)
- 6
Description
As originally reported in https://github.com/astral-sh/uv/issues/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 support FORCE_COLOR in addition to CLICOLOR_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 in anstyle-query crate. NO_COLOR would still take precedence over FORCE_COLOR.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in the anstyle-query crate by inspecting the existing clicolor_force function and its environment-variable checks. Add FORCE_COLOR support while preserving NO_COLOR precedence over both force-color variables, then verify the existing behavior and the new alias with the crate's tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 42/100