~jpastuszek/mkargs

Build command arguments
~jpastuszek/projects

New ticket tracker added

2 months ago
~jpastuszek/patches

New mailing list added

2 months ago

Latest Version Documentation License

Build command arguments.

use std::process::Command;
use mkargs::mkargs;

let world = "world".to_string();
let mut args = mkargs!["hello", world];

args.push_pair("foo", "bar");

Command::new("echo")
    .args(&*args)
    .spawn()
    .expect("echo command failed to start");