#[macro_use] extern crate structopt; use structopt::StructOpt; #[derive(StructOpt, Debug)] struct Opt { #[structopt(raw(required = "true", min_values = "2"))] foos: Vec, } fn main() { let opt = Opt::from_args(); println!("{:?}", opt); }