Skip to content

Extend section filtering to support wildcards #3072

@horenmar

Description

@horenmar

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".

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions