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

Added support for NO_COLOR #198

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

darimari21
Copy link

@darimari21 darimari21 commented Jan 18, 2024

fixed #197
I introduced a new no_color_enabled variable that checks if the NO_COLOR environment variable is set to the value 0. I made this change to allow the NO_COLOR convention.
I modified the return condition to take into account both clicolor_enable and no_color_enabled. So the function can activate the colors

Copy link

@alexandruradovici alexandruradovici left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please describe your pull request.

@darimari21 darimari21 changed the title fixed https://github.com/console-rs/console/issues/197 Added support for NO_COLOR Jan 21, 2024
@mitsuhiko
Copy link
Collaborator

I think this is a reasonable improvement. However the docs for colors_enabled require updating.

Copy link
Collaborator

@mitsuhiko mitsuhiko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please document the updated behavior in colors_enabled.

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 this pull request may close these issues.

Honour NO_COLOR environment variable alongside CLICOLOR
3 participants