We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
An argument with Option<Vec> does not seem to work. Are there any workarounds ?
#[derive(StructOpt, Debug)] pub enum DevCmds { #[structopt(name = "list", alias = "show")] Cmd1 { optional_args: Option<Vec<String>>, },
This produces errors like:
error[E0277]: the trait bound `std::vec::Vec<T>: std::str::FromStr` is not satisfied
The text was updated successfully, but these errors were encountered:
Why not just Vec?
Vec
Sorry, something went wrong.
Hi, I can't speak for @aurabindo, but for my use case I'd like to differentiate between
./my-app // None ./my-app --optional-multiple // Some(vec![]) ./my-app --optional-multiple ARG1 ARG2 // Some(vec![ARG1, ARG2])
is this currently possible without Option<Vec<T>>? Thanks for your work on structopt!
Option<Vec<T>>
That's not possible with structopt today. That's a structopt limitation, clap allows to do that.
Successfully merging a pull request may close this issue.
Hi,
An argument with Option<Vec> does not seem to work. Are there any workarounds ?
This produces errors like:
The text was updated successfully, but these errors were encountered: