Support informal `NO_COLOR` standard
details are here: https://no-color.org/
basically, I think we should honor the NO_COLOR=1 env var convention and nix any ANSI color on the terminal when this value is set and nonempty. Once we've done so, we should submit a PR here to add ourselves to the list of projects that support
I am ready to tackle this.
Please ping me if the team wants to add --color auto/always/never/ and respect NO_COLOR env var.
I am ready to tackle this.
Please ping me if the team wants to add
--color auto/always/never/and respectNO_COLORenv var.
@azzamsa sure, we'd accept a PR for this
It turns out that Iroh-CLI uses the Colored under the hood, which supports NO_COLOR out of the box. You can check out its features here: https://github.com/colored-rs/colored?tab=readme-ov-file#features.
The current version of Iroh-CLI already respects the NO_COLOR environment variable, thanks to Colored.
-
When
NO_COLORis not set: -
When
NO_COLORis set:
If my assumption is correct, then will open a PR here https://github.com/jcs/no_color
Nice! I guess this can be closed then. Feel free to re-open if that's a mistake though.