-
-
Notifications
You must be signed in to change notification settings - Fork 228
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
Use owo-colors
instead of anstyle
#183
Conversation
Thank you for looking into this!
Ok. Do we need the "full" functionality of this crate (checking for truecolor support etc.)? Does it provide anything additional on top of
Well the main use-case that I want to support by making always the default (which, admittedly, looks like an error.. but is really on purpose) is piping into a pager. |
That's a little bit unusual, from my perspective. I didn't actually know that colored output worked when piping; I assumed it didn't because the previous auto check would base coloring on if it was a TTY or not. It makes more sense to me for With that in mind, I would construct the |
That's how
Now the question is of course what to do with |
Co-authored-by: David Peter <sharkdp@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much!
Closes #179.
owo-colors
was suggested as a replacement foranstyle
by @mainrs because it exposes color support determination. After investigating this crate more, it turns out that it does this using thesupports-color
crate. The way thatowo-colors
exposes this ability does not work for my performance improvement, so I opted to use thesupports-color
crate directly.However, while I was looking around the
owo-colors
docs, I found it to be much more ergonomic for exposing raw color codes asconst
. I've therefore replacedanstyle
withowo-colors
and confirmed that it has the same output.I've also made
color=auto
default becausesupports-color
has made it more powerful at determining color support.