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 --color flag to force color even if stdout is a tty #439

Closed
wants to merge 1 commit into from

Conversation

danschwarz
Copy link
Collaborator

This option was inspired by @strk comment:
#422 (comment)

Now there is a --color option that works exactly like (but opposite to) the --no-color option.

There are other ways to implement this, possibly by replacing --no-color with something like --color with values like yes, no, auto (auto being default and what the app currently does if no flag passed).

If you'd rather see the flag implemented that way, I can change the code. Otherwise, this is good to go and allows things like

toot timeline --count 20 --color | less -R

to display timeline output, properly paged, in color.

@strk
Copy link
Contributor

strk commented Dec 7, 2023

Thanks! I see dmesg is using the --color auto|always|never (and -L for short, not sure by which rationale).

I'd say this implementation is ok. Thanks a lot !

@ihabunek
Copy link
Owner

ihabunek commented Dec 7, 2023

Thanks, but I'm in the middle of the Click rewrite so it will be handled there. See #428, work in progress.

@strk
Copy link
Contributor

strk commented Dec 7, 2023 via email

@ihabunek
Copy link
Owner

ihabunek commented Dec 7, 2023 via email

@strk
Copy link
Contributor

strk commented Dec 7, 2023 via email

@danschwarz danschwarz closed this Dec 10, 2023
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.

3 participants