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

support monochrome mode #1714

Merged
merged 1 commit into from
Aug 21, 2023
Merged

support monochrome mode #1714

merged 1 commit into from
Aug 21, 2023

Conversation

tw4452852
Copy link
Contributor

@tw4452852 tw4452852 commented Aug 3, 2023

Should help with #695

@xiaq
Copy link
Member

xiaq commented Aug 7, 2023

No color mode shouldn't affect what is actually stored in styled texts; it should only affect how they are printed. If users write code that uses styled texts but doesn't actually print them, it shouldn't be affected by NO_COLOR.

I am also slightly torn on use of a global flag, but this one feels justified. It gives the user no way to opt out of the behavior, but that may actually be a good thing.

Use NO_COLOR environment variable to enable monochrome mode in which foreground and background
colors will be stripped.

Signed-off-by: Tw <[email protected]>
@tw4452852
Copy link
Contributor Author

@xiaq How about the updated version?

@xiaq xiaq merged commit b84204b into elves:master Aug 21, 2023
16 checks passed
@tw4452852 tw4452852 deleted the monochrome branch August 21, 2023 05:34
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.

2 participants