Allow an arbitrary number of additional arguments
This commit is contained in:
parent
0bfe5f1a12
commit
80f8482a95
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user