Extend section filtering to support wildcards
- Dominant language
- C++
- Stars
- 21.5k
- Forks
- 3.5k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 2
Description
_Note that this would be a breaking change and thus requires major version
bump._
Some usage patterns would be easier if section filtering supported some
smarter features, such as globbing. The most common example are dynamic
sections (albeit those can be mostly handled by generator filtering instead),
and then sections whose naming follows a pattern (a common source of these
is naming section after paragraphs/sections/groups of requirements).
This would also necessitate supporting escaping of special characters, e.g.
via `\`.
## Examples
* `-c A*` - match section whose name starts with "A".
* `-c *A` - match section whose name ends with "A".
* `-c A\*` - match section named "A*".
* `-c A\\*` - match section whose name starts with "A\".
## Design questions
* Should we support globs in the middle? E.g. `-c A*B` would match any
section whose name starts with "A" and ends with "B".
* Should we support `OR` of patterns via comma? E.g. `-c A,B` would match
sections named **either** "A" **or** "B".
* Should we support negation of patterns? E.g. `-c ~A` would match any
section that is not named "A".
Contributor guide
Research direction
No files, tests, or entry points are named in the issue. Start by locating the section-filtering implementation and its existing tests, then resolve the open design questions about glob placement, escaping, alternatives, and negation. Done means the supported semantics are agreed, implemented, tested, and documented as a breaking change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli, testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100