macro_rules! cmd { ($bin : expr $(, $arg : expr) * $(,) ?) => { ... }; }
Create a Cmd with the given binary and arguments.
Cmd
The parameters to this macro may have completely different types. The single requirement for them is to implement Into<OsString>
Into
<
OsString
>
let path = Path::new("/foo/bar"); let cmd = cmd!("echo", "hi", path); cmd.run()?;