use std::path::PathBuf;
use structopt::StructOpt;
#[derive(Debug)]
pub struct CustomError(String);
#[derive(Debug, StructOpt)]
pub struct Cli {
#[structopt(subcommand)]
pub cmd: Command,
}
#[derive(StructOpt, Debug)]
pub enum Command {
Gen {
#[structopt(short, long, default_value = ".", parse(from_os_str))]
target: PathBuf,
},
GenPass {
#[structopt(short, long, default_value = "16")]
length: u8,
#[structopt(short, long)]
username: Option<String>,
#[structopt(short, long)]
password: Option<String>,
},
Apply {
#[structopt(short, long, parse(from_os_str))]
file: PathBuf,
#[structopt(short, long)]
dryrun: bool,
},
Validate {
#[structopt(short, long, parse(from_os_str))]
file: Option<PathBuf>,
},
Inspect {
#[structopt(short, long, parse(from_os_str))]
file: PathBuf,
},
}
pub fn parse() -> Cli {
Cli::from_args()
}