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

Respect color environment variables if set #813

Merged
merged 1 commit into from Feb 17, 2022
Merged

Respect color environment variables if set #813

merged 1 commit into from Feb 17, 2022

Conversation

ericwb
Copy link
Member

@ericwb ericwb commented Feb 14, 2022

According to command line standards [1], a command line should
do its best to honor certain environment variables requesting
whether color should be part of the standard output. Two such
vars include NO_COLOR (if set) and TERM (if set to dumb), when
set tell the CLI to disable color.

[1] https://clig.dev/#output

Partially-fixes #678

Signed-off-by: Eric Brown browne@vmware.com

According to command line standards [1], a command line should
do its best to honor certain environment variables requesting
whether color should be part of the standard output. Two such
vars include NO_COLOR (if set) and TERM (if set to dumb), when
set tell the CLI to disable color.

[1] https://clig.dev/#output

Partially-fixes #678

Signed-off-by: Eric Brown <browne@vmware.com>
@sigmavirus24
Copy link
Member

If we switch to Rich, I think it honors this for us

@ericwb ericwb added this to the Release 1.7.3 milestone Feb 16, 2022
@ericwb
Copy link
Member Author

ericwb commented Feb 17, 2022

If we switch to Rich, I think it honors this for us

True, but Rich brings in a lot of other function I don't think we need at this time.

@sigmavirus24
Copy link
Member

Honestly, I think our formatting could be better done via rich. We can do that in another PR though

@ericwb ericwb merged commit 1691b93 into PyCQA:main Feb 17, 2022
@ericwb ericwb deleted the color branch February 21, 2022 21:35
This was referenced Feb 28, 2022
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.

Conform more to command line standards
2 participants