Can you define the output of conflicts_with #5391
-
when you use conflicts_with on Arg::new it prints this if u provide the two conflicting flags
is there a way to customize this text to say something else when the two are provided other than this
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
There isn't way to do one-off customization. You'd need to get the |
Beta Was this translation helpful? Give feedback.
There isn't way to do one-off customization. You'd need to get the
clap::Error
and check theErrorKind
and thecontext
to see if its your message and then change it to what you want. This is not quite a well beaten path. However, if there are basics tweaks that work for all conflicts that could be made in clap itself, then everyone would benefit from the improvement.