pub fn cmd<T, U>(program: T, args: U) -> Expressionwhere
T: IntoExecutablePath,
U: IntoIterator,
U::Item: Into<OsString>,Expand description
Create a command with any number of of positional arguments, which may be
different types (anything that implements
Into<OsString>).
See also the cmd function, which takes a collection of
arguments.
Example
use std::path::Path;
use rtx::cmd;
let arg1 = "foo";
let arg2 = "bar".to_owned();
let arg3 = Path::new("baz");
let output = cmd!("echo", arg1, arg2, arg3).read();
assert_eq!("foo bar baz", output.unwrap());