How to cleanly match only one of distinct sets of arguments in clap? #2392
-
I have exactly three distinct sets of arguments that can be passed to my binary. Let's label them like this:
As you can see, they are completely different. For now, I plan to do the following: let app = App::new()...;
let args1 = app.arg(set1).get_matches();
let args2 = app.arg(set2).get_matches();
let args3 = app.arg(set3).get_matches(); While this may work (haven't tested yet), main problem I have is:
Is there a cleaner way to do this in |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Have you checked the |
Beta Was this translation helpful? Give feedback.
Have you checked the
subcommand
?