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 NO_COLOR #726

Merged
merged 2 commits into from
Mar 26, 2024
Merged

Support NO_COLOR #726

merged 2 commits into from
Mar 26, 2024

Conversation

dertuxmalwieder
Copy link
Contributor

@dertuxmalwieder dertuxmalwieder commented Mar 25, 2024

Just a small UX improvement for some people (that includes me). ref.: https://no-color.org

Just a small UX improvement for some people (that includes me).
ref.: https://no-color.org
# Handle NO_COLOR as well:
if os.environment.get('NO_COLOR') is not None:
args.nc = True

Copy link
Collaborator

Choose a reason for hiding this comment

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

Have you actually tried to run this code? The lint fails because there's no environment in the os module 😅
(…try getenv() instead)

Copy link
Collaborator

Choose a reason for hiding this comment

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

getenv() is preferred to environ.get()

Welcome to “don’t write code when tired”
@LeXofLeviafan
Copy link
Collaborator

Incidentally, changes to the CLI behaviour should be reflected in the docs (README, manpage, CLI help).

@LeXofLeviafan
Copy link
Collaborator

The repo owner prefers it when the pull-requests contain one commit, BTW. (You can soft-reset to the 1st one, then amend and force-push the feature branch to achieve that.)

@dertuxmalwieder
Copy link
Contributor Author

I'm not sure whether the fact that Buku (soon...) adheres to certain conventions should necessarily be documented as part of Buku itself. NO_COLOR is not a Buku feature.

@LeXofLeviafan
Copy link
Collaborator

LeXofLeviafan commented Mar 25, 2024

NO_COLOR is not a Buku feature.

It will be once the pull-request is merged 😅

(And the fact that it exists elsewhere doesn't mean anything – if it affects the runtime behaviour it should be documented so that end users are actually aware of it.)

@jarun
Copy link
Owner

jarun commented Mar 26, 2024

It's OK to add a note in the Wiki that Buku supports the env var NO_COLOR.

@jarun jarun merged commit 7e994a7 into jarun:master Mar 26, 2024
1 check passed
@jarun
Copy link
Owner

jarun commented Mar 26, 2024

Thank you!

@jarun
Copy link
Owner

jarun commented Mar 26, 2024

Added a note here: https://github.com/jarun/buku/wiki/Customize-colors

@github-actions github-actions bot locked and limited conversation to collaborators Apr 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants