From 9c3349178ee7204d4fbba01bb7af44baecd9547b Mon Sep 17 00:00:00 2001 From: Audrey Dutcher Date: Mon, 15 Apr 2024 12:17:50 -0700 Subject: [PATCH] wip --- src/main.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 5a6023d..f890ef6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -13,8 +13,16 @@ struct Cli { #[derive(Subcommand, Debug, Clone)] enum Subcommands { Run { + /// Any number of filepaths to treat as inputs. They will be hashed and accesses to + /// equivalent files will be treated specially. + #[arg(short, long)] + input: Vec, + + /// The filepath to dump the json report to. will dump to stdout if unspecified. #[arg(short, long)] output: Option, + + /// The command to run. Have fun! cmd: Vec, } } @@ -23,7 +31,7 @@ fn main() { env_logger::init(); let cli = Cli::parse(); match cli.cmd { - Subcommands::Run { output, cmd } => { + Subcommands::Run { input, output, cmd } => { let fp: Box = if let Some(output) = &output { Box::new(std::fs::File::options().write(true).create(true).open(output).unwrap()) } else {