Function duct::cmd
[−]
[src]
pub fn cmd<T, U, V>(program: T, args: U) -> Expression where T: ToExecutable, U: IntoIterator<Item=V>, V: Into<OsString>
Create a command given a program name and a collection of arguments.
See also the cmd!
macro, which doesn't require a collection.
Example
use duct::cmd; let args = vec!["foo", "bar", "baz"]; let output = cmd("echo", &args).read(); assert_eq!("foo bar baz", output.unwrap());