Open mkaput opened 10 months ago
While this crate follows https://bixense.com/clicolors/, several crates in the ecosystem (for example tracing) follow another convention of forcing tools not to print coloured output: https://no-color.org/
tracing
I wonder if it wouldn't be feasible to support both conventions simultaneously in this crate. The unknown question is which convention should be prioritized. Personally, I think it doesn't matter and would probably check NO_COLOR after CLICOLOR.
NO_COLOR
CLICOLOR
Relevant code, as far as I see, is only this chunk: https://github.com/console-rs/console/blob/de2f15a31a8fef0b0e65ef4bdf92cd03c3061dac/src/utils.rs#L19-L23
While this crate follows https://bixense.com/clicolors/, several crates in the ecosystem (for example
tracing
) follow another convention of forcing tools not to print coloured output: https://no-color.org/I wonder if it wouldn't be feasible to support both conventions simultaneously in this crate. The unknown question is which convention should be prioritized. Personally, I think it doesn't matter and would probably check
NO_COLOR
afterCLICOLOR
.Relevant code, as far as I see, is only this chunk: https://github.com/console-rs/console/blob/de2f15a31a8fef0b0e65ef4bdf92cd03c3061dac/src/utils.rs#L19-L23