Allow an arbitrary number of additional arguments

This commit is contained in:
Juergen Stuber 2023-04-16 17:06:35 +02:00
parent 0bfe5f1a12
commit 80f8482a95
1 changed files with 3 additions and 3 deletions

View File

@ -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<String>,
/// Frame rate for displaying
#[arg(short, long, default_value_t = 25)]
frame_rate: u64,
@ -37,7 +37,7 @@ fn main() -> Result<(), Box<dyn error::Error>> {
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 {