mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 12:49:19 +00:00
Shell: Allow commands in variables, and properly substitute them on use
This allows the below interaction to work: ``` $ silence=(2>&1 >/dev/null) $ do_noisy_thing with these args $silence <nothing here lol> ```
This commit is contained in:
parent
42304d7bf1
commit
c5d0aa9a44
Notes:
sideshowbarker
2024-07-19 05:09:11 +09:00
Author: https://github.com/alimpfard
Commit: c5d0aa9a44
Pull-request: https://github.com/SerenityOS/serenity/pull/2542
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/bugaevc
5 changed files with 161 additions and 68 deletions
|
@ -107,6 +107,7 @@ sequence :: variable_decls? pipe_sequence ';' sequence
|
|||
| variable_decls? pipe_sequence
|
||||
|
||||
variable_decls :: identifier '=' expression (' '+ variable_decls)? ' '*
|
||||
| identifier '=' '(' pipe_sequence ')' (' '+ variable_decls)? ' '*
|
||||
|
||||
pipe_sequence :: command '|' pipe_sequence
|
||||
| command
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue