pub enum Command {
Simple(SimpleCommand),
Compound(CompoundCommand, Option<RedirectList>),
Function(FunctionDefinition),
ExtendedTest(ExtendedTestExprCommand),
}Expand description
Represents a shell command.
Variants§
Simple(SimpleCommand)
A simple command, directly invoking an external command, a built-in command, a shell function, or similar.
Compound(CompoundCommand, Option<RedirectList>)
A compound command, composed of multiple commands.
Function(FunctionDefinition)
A command whose side effect is to define a shell function.
ExtendedTest(ExtendedTestExprCommand)
A command that evaluates an extended test expression.
Trait Implementations§
Source§impl SourceLocation for Command
impl SourceLocation for Command
Source§fn location(&self) -> Option<TokenLocation>
fn location(&self) -> Option<TokenLocation>
The location of the syntax item, when known
Auto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnwindSafe for Command
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more