Replies: 1 comment
-
|
While I hadn't considered |
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I want my
program --helpmessageUsage:section to look something like this:My
programmust run--setuponce after installation. After that, it can be run many times with varied requiredPATHSand optionalOPTIONS.So to install and run my program, the user would run these shell commands:
So
--setupmust be run once and should not have other arguments or options. After that, all other arguments and options may be used. Soprogram --setup awould cause clap to print an error that--setupand-ashould not be intermixed.What is a good way to have something like this one-time use "exclusive mode" or "setup mode"?
It's okay if the user runs
--setupmore than once. More importantly, how to succinctly communicate that--setupis a distinct "mode" apart from the normal "mode" that may use other arguments and options?In my case, I'm using
#[derive(Parser)] struct CLI_Args { .. }to create the argument structure. Hopefully it's possible withDerive.Beta Was this translation helpful? Give feedback.
All reactions