rust-cli / rust-cli/anstyle

Supporting FORCE_COLOR as an alias to CLICOLOR_FORCE

Open
#192 6 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-stream C-enhancement
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.