Replies: 1 comment
-
If we were to consider this, I think I'd reserve it for clap v5 as this would be a major departure in behavior that people would be handling in their programs today. With this proposal
The question is which should be our priority
And for being used directly, which would a user expect more. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In this example (reduced to a minimum just to show the idea) ...
...
my_get_args -> Result<MyConfig, Box<dyn Error>>
uses clap's.try_get_matches()
under the hood to return an error instead of quitting right away. Usually errors'Display
implementations do not add a trailing newline automatically. The error returned by clap's.try_get_matches()
, however, appears to have one, making such chaining of results as shown above difficult if wanting to achieve consistency, ie. no blank line after error messages.Is there a chance to have the trailing newline omitted in the
Display
implementation of the returned error, while, of course, keeping it when it gets printed via.get_matches()
? Or is that principally something you wouldn't agree with?Beta Was this translation helpful? Give feedback.
All reactions