Enum oursh::program::posix::ast::Command [−][src]
pub enum Command { Simple(Vec<Assignment>, Vec<Word>, Vec<Redirect>), Compound(Vec<Command>), Not(Box<Command>), And(Box<Command>, Box<Command>), Or(Box<Command>, Box<Command>), Subshell(Box<Program>), Pipeline(Box<Command>, Box<Command>), Background(Box<Command>), Lang(Interpreter, String), }
Expand description
A command is a highly mutually-recursive node with the main features of the POSIX language.
Variants
A full program embedded in a compound command.
{ ls ; }
Performs boolean negation to the status code of the inner command.
Examples
! grep 'password' data.txt
Perform the first command, conditionally running the next upon failure.
Examples
kill $1 || kill -9 $1
Run a program through another parser/interpreter.
Examples
{#ruby puts (Math.sqrt(32**2/57.2))}
Compatibility
This is non-POSIX
TODO: How bad is it?
Tuple Fields of Lang
0: Interpreter
1: String
Implementations
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Command
impl UnwindSafe for Command
Blanket Implementations
Mutably borrows from an owned value. Read more