2022-06-18 21:56:31 -07:00
|
|
|
use super::*;
|
2022-05-31 13:01:59 -07:00
|
|
|
|
|
|
|
#[derive(Debug, Clone, PartialEq, Serialize)]
|
|
|
|
pub(crate) struct Shell<'src> {
|
|
|
|
pub(crate) arguments: Vec<StringLiteral<'src>>,
|
|
|
|
pub(crate) command: StringLiteral<'src>,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<'src> Display for Shell<'src> {
|
|
|
|
fn fmt(&self, f: &mut Formatter) -> Result<(), fmt::Error> {
|
|
|
|
write!(f, "[{}", self.command)?;
|
|
|
|
|
|
|
|
for argument in &self.arguments {
|
|
|
|
write!(f, ", {}", argument)?;
|
|
|
|
}
|
|
|
|
|
|
|
|
write!(f, "]")
|
|
|
|
}
|
|
|
|
}
|