1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:38:11 +00:00

Shell: Expand Juxtaposition of lists to list products

This commit makes `echo x(foo bar)` create an argv of `echo xfoo xbar`,
essentially modeling brace expansions in some shells.
This commit is contained in:
AnotherTest 2020-06-20 18:00:45 +04:30 committed by Andreas Kling
parent 16def040af
commit 8e078cf4ab
5 changed files with 119 additions and 68 deletions

View file

@ -120,10 +120,10 @@ redirection :: number? '>'{1,2} ' '* string_composite
list_expression :: ' '* expression (' '+ list_expression)?
expression :: evaluate
| string_composite
| comment
| '(' list_expression ')'
expression :: evaluate expression?
| string_composite expression?
| comment expession?
| '(' list_expression ')' expression?
evaluate :: '$' expression {eval / dynamic resolve}