Parse command line args

This commit is contained in:
Joscha 2021-11-07 12:10:42 +00:00
parent 6c0cb6489a
commit 04b59293f2
3 changed files with 202 additions and 2 deletions

View file

@ -1,5 +1,16 @@
use std::path::PathBuf;
use structopt::StructOpt;
mod commands;
fn main() {
println!("Hello, world!");
#[derive(Debug, StructOpt)]
pub struct Opt {
#[structopt(parse(from_os_str))]
file: PathBuf,
}
fn main() {
let opt = Opt::from_args();
println!("{:#?}", opt);
}