Skip to content

icupkg: -c or --copyright reads or as a value and loses --copyright #142

Description

@sadigaxund

In mandible icupkg the flag list shows -c or with no description. The row is

	-c or --copyright include the ICU copyright notice

Two value-free spellings joined by the word or, with the description starting one space after --copyright. The parser already reads or-joined rows when they carry values or when the description sits two or more spaces away (docs/shapes.md S-099). This value-free, one-space form is the gap: -c keeps the literal word or as its value name, --copyright reaches nothing.

What it should look like: one flag with spellings -c, --copyright and the description include the ICU copyright notice, exactly like the row below it, -C comment or --comment comment, already renders.

Where to read

  • docs/shapes.md S-134 (this shape) and S-099 (the or-joined rule that exists).
  • corpus/icupkg/74.2/meta.toml, the fixture, marked [xfail] with this shape in the reason.
  • xtask/src/detector/or_joined_alias_single_space_gap.rs, the fleet detector, and its self-check cases: they show what must not be matched (-h or -? or --help, and -m or --match-arch file.o).

Where to change

  • mandible-extract/src/help_text/grammar.rs, or_alias_ends_the_spec and the code around the S-099 comments. The rule to add: after or, a genuine --long spelling followed by one space and a lowercase word that is not a value placeholder ends the spelling list and starts the description.

How to verify

Same five steps as above, with detector self-check or-joined-alias-single-space-gap, the icupkg fixture promoted out of [xfail], and ./target/release/mandible icupkg showing -c, --copyright. Check ./target/release/mandible vim.basic and sg_map too: they carry S-099 rows and must not change.

Activity

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

    bug/parsingTag when mandible extracts the wrong flags, commands, or values from a tool's help text.good first issueGood for newcomers

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions