verbose_multiple/
verbose_multiple.rsuse docopt::Docopt;
use serde::Deserialize;
const USAGE: &'static str = "
Usage: cp [options] [-v | -vv | -vvv] <source> <dest>
cp [options] [-v | -vv | -vvv] <source>... <dir>
Options:
-a, --archive Copy everything.
-v, --verbose Show extra log output.
";
#[derive(Debug, Deserialize)]
struct Args {
arg_source: Vec<String>,
arg_dest: String,
arg_dir: String,
flag_archive: bool,
flag_verbose: usize,
}
fn main() {
let args: Args = Docopt::new(USAGE)
.and_then(|d| d.deserialize())
.unwrap_or_else(|e| e.exit());
println!("{:?}", args);
}