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

Honor the NO_COLOR env variable #4246

Merged
merged 5 commits into from
Jan 5, 2025
Merged

Conversation

gamlerhart
Copy link
Contributor

When the NO_COLOR env variable is set,
then avoid coloring the terminal.

--color argument does overrides the env variable

Inspired by https://no-color.org
and asked in discussion: #4170

Copy link
Contributor

@rolandtritsch rolandtritsch left a comment

Choose a reason for hiding this comment

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

Thanks for the fix. NO_COLOR for the win!

@rolandtritsch
Copy link
Contributor

BTW ... are you also going to update the NO_COLOR website or do you want me to do that? - https://github.com/jcs/no_color

When the NO_COLOR env variable is set,
then avoid coloring the terminal.

--color argument does overrides the env variable

Inspired by https://no-color.org
and asked in discussion: com-lihaoyi#4170
Copy link
Member

@lefou lefou left a comment

Choose a reason for hiding this comment

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

Looks good to me. Using _.nonEmpty (as @lolgab requested) would be even nicer. And a cross reference to the no-color.org site would be nice too.

gamlerhart and others added 2 commits January 5, 2025 11:55

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Co-authored-by: Lorenzo Gabriele <lorenzolespaul@gmail.com>
@lefou
Copy link
Member

lefou commented Jan 5, 2025

And a cross reference to the no-color.org site would be nice too.

@gamlerhart Sorry for being ambiguous. I meant to add Mill to the no-color.org site. I think the link in the --help is a bit too much.

lefou added 2 commits January 5, 2025 12:07

Verified

This commit was signed with the committer’s verified signature. The key has expired.
lefou Tobias Roeser
This reverts commit 8c8955b.

Verified

This commit was signed with the committer’s verified signature. The key has expired.
lefou Tobias Roeser
@lefou lefou merged commit fddd83c into com-lihaoyi:main Jan 5, 2025
26 checks passed
@lefou lefou added this to the 0.12.6 milestone Jan 5, 2025
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.

None yet

4 participants