-
Notifications
You must be signed in to change notification settings - Fork 140
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
Terminal coloring wishlist #268
Comments
Oh this is a rather comprehensive listing. I think I can take this with such detail. |
Feel free to take up the work if ya want! I'd be happy to review a PR for it |
There's a kind of chicken and eggs problem: if we want a |
Fortunately doesn't look like we need to dig very deep https://docs.rs/clap/latest/clap/enum.ColorChoice.html There just may need to be some extra logic to determine that choice, but passing it to clap is straightforward |
Not completely, there's at least an |
I think it's reasonable enough to ignore |
Alright, it's just mildly annoying to be partially inconsistent. |
Besides, IMO |
I agree it would be normal for I don't want to do any "permissive parsing" of the CLI args though. If there was a failure parsing any of the args then we discard all of that information |
Sure, current usage is just that, clap would handle parsing failure itself and exit before we get the results. |
Currently our support for terminal coloring is pretty spotty. Ideally we would
ansi_term
since it's been unmaintained for quite a whileNO_COLOR
andFORCE_COLOR
(most coloring libraries support this out-of-the-box these days)--colo[u]r <when>
flag where<when>
can bealways|auto|never
stdout
orstderr
independently being a ttystdout
is a tty then so isstderr
and vice-versa. We should appropriately handle either one being a tty (*cough cough* use something likeanstream
*cough*)I was planning on looking into
anstream
andowo-colors
, but anything that can handle all of the above should work just fineThe text was updated successfully, but these errors were encountered: