Introducing sh: A helper macro to build and execute commands
sh is a macro for easily building and executing commands. It allows you to pipe IO from/to strings and use rust expressions for arguments
Here's an example to show what it looks like
let mut out1 = String::new();
let mut out2 = String::new();
let name = "John";
sh! {
echo hello {name} > {&mut out1};
echo {name} was greeted > {&mut out2};
}
assert_eq!(&out1, "hello John\
");
assert_eq!(&out2, "John was greeted\
");