mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 12:07:45 +00:00
Shell: Add support for brace expansions
This adds support for (basic) brace expansions with the following syntaxes: - `{expr?,expr?,expr?,...}` which is directly equivalent to `(expr expr expr ...)`, with the missing expressions replaced with an empty string literal. - `{expr..expr}` which is a new range expansion, with two modes: - if both expressions are one unicode code point long, the range is equivalent to the two code points and all code points between the two (numerically). - if both expressions are numeric, the range is equivalent to both numbers, and all numbers between the two. - otherwise, it is equivalent to `(expr expr)`. Closes #3832.
This commit is contained in:
parent
567f2f3548
commit
5640e1bc3a
9 changed files with 374 additions and 3 deletions
|
@ -41,6 +41,7 @@ class And;
|
|||
class ListConcatenate;
|
||||
class Background;
|
||||
class BarewordLiteral;
|
||||
class BraceExpansion;
|
||||
class CastToCommand;
|
||||
class CastToList;
|
||||
class CloseFdRedirection;
|
||||
|
@ -58,6 +59,7 @@ class Join;
|
|||
class MatchExpr;
|
||||
class Or;
|
||||
class Pipe;
|
||||
class Range;
|
||||
class ReadRedirection;
|
||||
class ReadWriteRedirection;
|
||||
class Sequence;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue