217 lines
5.5 KiB
Plaintext
217 lines
5.5 KiB
Plaintext
================================================================================
|
|
Simple Command
|
|
================================================================================
|
|
|
|
^ls
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(root
|
|
(statement
|
|
(statement_kind
|
|
(expression
|
|
(command
|
|
(command_text))))))
|
|
|
|
================================================================================
|
|
Command Sequence
|
|
================================================================================
|
|
|
|
^less ^ls
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(root
|
|
(statement
|
|
(statement_kind
|
|
(expression
|
|
(command
|
|
(command_text)))))
|
|
(statement
|
|
(statement_kind
|
|
(expression
|
|
(command
|
|
(command_text))))))
|
|
|
|
================================================================================
|
|
Command with Arguments
|
|
================================================================================
|
|
|
|
^ls --long -a
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(root
|
|
(statement
|
|
(statement_kind
|
|
(expression
|
|
(command
|
|
(command_text)
|
|
(command_argument)
|
|
(command_argument))))))
|
|
|
|
================================================================================
|
|
Command Sequence with Arguments
|
|
================================================================================
|
|
|
|
^cargo run -- -c "output('hi there')"
|
|
^ls --long -a
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(root
|
|
(statement
|
|
(statement_kind
|
|
(expression
|
|
(command
|
|
(command_text)
|
|
(command_argument)
|
|
(command_argument)
|
|
(command_argument)
|
|
(command_argument)))))
|
|
(statement
|
|
(statement_kind
|
|
(expression
|
|
(command
|
|
(command_text)
|
|
(command_argument)
|
|
(command_argument))))))
|
|
|
|
================================================================================
|
|
Command Sequence with Arguments
|
|
================================================================================
|
|
|
|
^cargo run -- -c "output('hi there')"
|
|
^ls --long -a
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(root
|
|
(statement
|
|
(statement_kind
|
|
(expression
|
|
(command
|
|
(command_text)
|
|
(command_argument)
|
|
(command_argument)
|
|
(command_argument)
|
|
(command_argument)))))
|
|
(statement
|
|
(statement_kind
|
|
(expression
|
|
(command
|
|
(command_text)
|
|
(command_argument)
|
|
(command_argument))))))
|
|
|
|
================================================================================
|
|
Command Assignment
|
|
================================================================================
|
|
|
|
ls_output = ^ls --long -a;
|
|
cat_output = ^cat Cargo.toml;
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(root
|
|
(statement
|
|
(statement_kind
|
|
(assignment
|
|
(identifier)
|
|
(assignment_operator)
|
|
(statement
|
|
(statement_kind
|
|
(expression
|
|
(command
|
|
(command_text)
|
|
(command_argument)
|
|
(command_argument))))))))
|
|
(statement
|
|
(statement_kind
|
|
(assignment
|
|
(identifier)
|
|
(assignment_operator)
|
|
(statement
|
|
(statement_kind
|
|
(expression
|
|
(command
|
|
(command_text)
|
|
(command_argument)))))))))
|
|
|
|
================================================================================
|
|
Command with Semicolon
|
|
================================================================================
|
|
|
|
ls_output = ^ls --long -a; ls_output
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(root
|
|
(statement
|
|
(statement_kind
|
|
(assignment
|
|
(identifier)
|
|
(assignment_operator)
|
|
(statement
|
|
(statement_kind
|
|
(expression
|
|
(command
|
|
(command_text)
|
|
(command_argument)
|
|
(command_argument))))))))
|
|
(statement
|
|
(statement_kind
|
|
(expression
|
|
(identifier)))))
|
|
|
|
================================================================================
|
|
Command with Semicolon
|
|
================================================================================
|
|
|
|
ls_output = ^ls --long -a; ls_output
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(root
|
|
(statement
|
|
(statement_kind
|
|
(assignment
|
|
(identifier)
|
|
(assignment_operator)
|
|
(statement
|
|
(statement_kind
|
|
(expression
|
|
(command
|
|
(command_text)
|
|
(command_argument)
|
|
(command_argument))))))))
|
|
(statement
|
|
(statement_kind
|
|
(expression
|
|
(identifier)))))
|
|
|
|
================================================================================
|
|
Command with Quoted Semicolon
|
|
================================================================================
|
|
|
|
ls_output = ^echo ';'; ls_output
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(root
|
|
(statement
|
|
(statement_kind
|
|
(assignment
|
|
(identifier)
|
|
(assignment_operator)
|
|
(statement
|
|
(statement_kind
|
|
(expression
|
|
(command
|
|
(command_text)
|
|
(command_argument))))))))
|
|
(statement
|
|
(statement_kind
|
|
(expression
|
|
(identifier)))))
|