matklad / xshell

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add a `cmds!` that runs multiple

cgwalters opened this issue · comments

Basically would allow going from e.g.:

cmd!(sh, "foo --blah").run()?;
cmd!(sh, "othercmd --somearg --otherarg").run()?;
cmd!(sh, "bar --baz").run()?;

to

cmds!(sh, "foo --blah
othercmd --somearg --otherarg
bar --baz").run()?;

Happy to try implementing this if you agree; roughtly I think we'd return a struct CmdList(Vec<Cmd>) in this case whose only method is fn run(self) -> Result<()> or so?