macro_rules! cmd {
($(@head ($($head:tt)* ))? $curr:literal $(, $($tail:tt)*)?) => { ... };
($(@head ($($head:tt)* ))? $curr:expr $(, $($tail:tt)*)?) => { ... };
(@head ($($head:tt)* )) => { ... };
(@last $this:expr, $($arg:expr),* $(,)?) => { ... };
}
Expand description
easy syntax to create a Command
(A1, A2, A3)
expands to
ⓘ
A1.cmd().await?
.arg(A2)
.arg(A3)
.kill_on_drop(true)
If An
is a string literal, it is replaced with format!(a)