Skip to content

Question: does the glob parser support brace expansion? #92

Open

Description

@medium-effort

This morning antigravity has an update where it has stricter markdown frontmatter parsing. the usual ["a,b"] format doesn't work and trigger this error

Image

it doesn't error anymore when using this format

globs: "{src/platform/win32/.cpp,src/core/.cpp,tests/*.cpp}"

question is, does opencode-rules support that format as well? it's nowhere on the readme currently

Activity

  1. frap129 commented on Nov 12, 2026

    @frap129
    Owner

    minimatch (the package I use for expression matching) supports brace expansion, and the README's Glob Pattern Reference already demonstrates it (lib/{utils,helpers}/**/*.js). So this works:

    globs:
      - "{src/platform/win32/*.cpp,src/core/*.cpp,tests/*.cpp}"
    

    (or inline: globs: ["{src/platform/win32/.cpp,src/core/.cpp,tests/*.cpp}"]). It's equivalent to listing the three patterns separately.

    The format you sent doesnt work, globs (and every array condition field) only accepts a YAML array. I will see if I can add it.

  2. frap129 commented on Nov 12, 2026

    @frap129
    Owner

    The format supported by antigravity should be available in the next release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions