Open kanpov opened 1 month ago
The same as arc_command, but for shell.
I did this very easily via an extension trait, but it should be available out-of-the-box imo considering arc_command and arc_raw_command are there:
trait ArcShellExt { fn arc_shell<S: AsRef<str>>(self: Arc<Self>, command: S) -> OwningCommand<Arc<Self>>; } impl ArcShellExt for Session { fn arc_shell<S: AsRef<str>>(self: Arc<Self>, command: S) -> OwningCommand<Arc<Self>> { let mut cmd = self.arc_command("sh"); cmd.arg("-c").arg(command.as_ref()); cmd } }
That's neat!
I would welcome PR/contribution for that API!
The same as arc_command, but for shell.
I did this very easily via an extension trait, but it should be available out-of-the-box imo considering arc_command and arc_raw_command are there: