From 80f8482a95d5a727c5b96c90e560cd38f3aebafe Mon Sep 17 00:00:00 2001 From: Juergen Stuber Date: Sun, 16 Apr 2023 17:06:35 +0200 Subject: [PATCH] Allow an arbitrary number of additional arguments --- src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 9967cfc..d0053a2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -18,8 +18,8 @@ struct Cli { cols: usize, /// Number of rows in a frame rows: usize, - /// Free-format argument to pass to the executable - arg: String, + /// Free-format arguments to pass to the executable + args: Vec, /// Frame rate for displaying #[arg(short, long, default_value_t = 25)] frame_rate: u64, @@ -37,7 +37,7 @@ fn main() -> Result<(), Box> { let mut child = process::Command::new(&cli.executable) .arg(cli.cols.to_string()) .arg(cli.rows.to_string()) - .arg(cli.arg) + .args(cli.args) .stdout(process::Stdio::piped()) .spawn()?; if cli.debug >= 1 {