[−][src]Macro cmd_macro::cmd
cmd!() { /* proc-macro */ }
Run a series of commands
Example
#![feature(proc_macro_hygiene)] use cmd_macro::cmd; fn main() { let who = "world"; let output = cmd!(echo hello #who ##who).unwrap(); let output = String::from_utf8(output.stdout).unwrap(); assert_eq!(output, "hello world #who\n"); let s = "seq"; let n = 3; let output = cmd!(#s #{2 * n}).unwrap(); let output = String::from_utf8(output.stdout).unwrap(); assert_eq!(output, "1\n2\n3\n4\n5\n6\n"); }