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
Consider using idiomatic Rust errors #2294
Comments
Feel free to send a PR as this is only a minor stylistic incoherence. |
Yes, it is stylistic, but I would still like the see others reasons for it. "Rust does it" is not good enough because rust is not primarily CLI tool. Is there research into famous CLI parsers from other languages and how they print the error messages when color is turned on? If there's a convention there, we will follow. |
@pksunkara it looks like colorized out is not a widely supported function. Argparse and the like don't support it out of the box. So it looks like you can decide how exactly you want to colorize the output of Clap since you are the authors. I just think that Rust's errors look very nice and why not follow that convention out of all others. |
Describe your use case
Currently, the errors look like this:
With the colon in
error:
being red just like the error label itself. However, the idiomatic Rust compiler errors look like this:Describe the solution you'd like
It is a very minor thing, but it causes stylistic incoherence in projects that adhere to the idiomatic error style. Particularly, a few of my projects. (As you can see, I am a perfectionist... I know, sorry.) It would be great if this thing got fixed. There are libraries out there that could potentially make it easier (e.g. idioma)
The text was updated successfully, but these errors were encountered: