Skip to content

Program option taking multiple values with subcommands #1707

Answered by CreepySkeleton
lazytiger asked this question in Q&A
Discussion options

You must be logged in to vote
$ cargo run -- --option-general fuuu --files file1 file2 subcommand --option-for-subcommand argh
    Finished dev [unoptimized + debuginfo] target(s) in 0.19s
     Running `target\debug\lucid.exe --option-general fuuu --files file1 file2 subcommand --option-for-subcommand argh`
error: Found argument '--option-for-subcommand' which wasn't expected, or isn't valid in this context
If you tried to supply `--option-for-subcommand` as a PATTERN use `-- --option-for-subcommand`

USAGE:
    lucid.exe --option-general <option-general> --files <files>... <SUBCOMMAND>

For more information try --help
error: process didn't exit successfully: `target\debug\lucid.exe --option-general fuuu --files file1…

Replies: 8 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by pksunkara
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants