-
-
Notifications
You must be signed in to change notification settings - Fork 809
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
"-c never" and NO_COLOR are not respected for -h and other usage messages #600
Comments
Thank you for reporting this. That should be fixed, if possible (I'm not entirely sure if clap allows us to read the value of |
@sharkdp If you did not yet take a look, I'd like to try to debug and offer a PR |
sounds great! |
@tpiekarski It's probably not completely trivial. We might need to set But maybe I'm missing something. |
@sharkdp Thanks for taking a closer look. |
Indeed it does not look straight forward at all. But I got an idea how it could be accomplished without providing a custom function for In app.rs#L7 The only issue I did not yet figured out is, how it could be possible to check the argument color without being able to parse the arguments with |
That's why I suggested the approach above. We will not be able to set It might be worth asking this question in the |
Alright, I suspected that you checked such solution already. None the less I wanted to take a look into the issue. I am not so much in favor to rewrite Indeed there is an open issue at clap for the very feature we've been talking about Partial / Pre Parsing a CLI. What do you think we track this issue and return to this here when it is possible to pre-parsing arguments? To be frank I'm not confident to look into the issue at clap myself - I am not experienced enough with Rust. Maybe you've got the time to take a closer look there. |
I guess we could at least implement the |
fix released in v8.2.0. |
When adding
-c never
I would expect it to also apply to the-h
output, but that's still coloured:This also applies to something like
fd -c none -v
, which is an error but has coloured (hard to read) output:In general, I'd really recommend to be careful with coloured terminal stuff, because what's helpful for one personal might be next-to-unreadable for the next (especially if it's non-configurable).
This is fd 8.1.0 on Void Linux.
The text was updated successfully, but these errors were encountered: