mirror of
https://github.com/RGBCube/serenity
synced 2026-01-13 12:41:01 +00:00
This patchset allows a match expression to have a list of names for its
glob parts, which are assigned to the matched values in the body of the
match.
For example,
```sh
stuff=foobarblahblah/target_{1..30}
for $stuff {
match $it {
*/* as (dir sub) {
echo "doing things with $sub in $dir"
make -C $dir $sub # or whatever...
}
}
}
```
With this, match expressions are now significantly more powerful!
|
||
|---|---|---|
| .. | ||
| backgrounding.sh | ||
| brace-exp.sh | ||
| builtin-redir.sh | ||
| control-structure-as-command.sh | ||
| function.sh | ||
| if.sh | ||
| loop.sh | ||
| match.sh | ||
| sigpipe.sh | ||
| special-vars.sh | ||
| subshell.sh | ||
| valid.sh | ||