rust-lang / rust-lang/glob

Support string alternative syntax (curly braces pattern)

Open
#2 2 comments 30 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
595
Forks
93
PR merge metrics
No merged PRs in 30d

Description

Is there a plan to support string alternatives with curly braces, like {foo,bar}program matching fooprogram and barprogram?

To avoid code duplication in the matcher, I was thinking it might be a good idea to use the regex crate to implement this (as well as the rest of glob).

Support in other languages:

  • C/C++: yes using the GLOB_BRACE option.
  • Python: no
  • Ruby: yes
  • Java: yes

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the glob matcher and reviewing how existing pattern syntax is parsed. Confirm how {foo,bar}program should match both alternatives, then check the current test coverage and add cases that demonstrate the intended behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.