Skip to content
This repository was archived by the owner on Nov 7, 2025. It is now read-only.
This repository was archived by the owner on Nov 7, 2025. It is now read-only.

Specify short form of CLAP flag, when having multiple flags starting with same letter #34

@Bajger

Description

@Bajger

Enhance ClapFlag with option to specify short form of flag name.

Describe the request
Currently, short form ClapFlag instance is always represented by first letter of long version name. This causes a problem, when having multiple flags starting with same letter, e.g. noHeader and name. There should be an option to specify short name programmatically (when specifying command) in order to avoid name conficts.

Expected behavior

(ClapFlag id: #name)
	description: 'Name description.';
        shortName: 'n';

...
(ClapFlag id: #noHeader)
	description: 'No header description.';
        shortName: 'h';

Expected development cost

  • Add instance variable on ClapFlag class and setter method.
  • Modify shortName getter method to access instance variable and assign first letter substring in initialize method (or lazy assignment).

Version information:

  • reported on CLAP version: 1163bde

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions