Skip to content

flash: Switch shell parser to brush - #270

Merged
sampsyo merged 3 commits into
mainfrom
flash-brush-parser
May 26, 2026
Merged

sampsyo merged 3 commits into
mainfrom
flash-brush-parser

Conversation

@sampsyo

@sampsyo sampsyo commented May 25, 2026

Copy link
Copy Markdown
Collaborator

This switches the shell syntax parser from flash to brush-parser. Aside from resolving some naming confusion (I totally stole flash's name idea), this makes our shell syntax a bit more compatible out of the box. For example, breaking a command across multiple lines like this:

foo | \
  bar

…didn't previously work; now it does. And in general, brush seems to be an active project, so I am a little more optimistic about things getting fixed in the future.

sampsyo added 3 commits May 25, 2026 18:55
Just a crude first attempt to use brush as the shell syntax parser.
Still doing something a little weird with quotes...
Sensibly, `brush_parser` leaves the syntax for "words" (e.g., command
arguments) unparsed in the AST. So we have to explicitly parse those too
and flatten them into a string. A real shell would do all sorts of
expansion, such as for `$FOO` variable references, but we do none of
that and just try to extract the text.
It's the grand payoff for switching shell parsers!!! :/
@sampsyo
sampsyo merged commit 2421a7f into main May 26, 2026
8 checks passed
@sampsyo
sampsyo deleted the flash-brush-parser branch May 26, 2026 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant