Skip to content

flag: add ability to define short, long flags and combine short flags #1

Description

@RaphGL

Modify library to distinguish between long and short flags.
for example flag_int should have the following signature:

long *flag_long(flag_Parser *p, char *long_name, char *short_name, long default_val, char *usage);

Where long_name and short_name can be NULL or empty (\0) to have the short or long flag undefined)
When the flag is a short flag, the parser should allow using multiple short flags together so -f and -a could be used together like this: -fa (this matches the behavior of getopts)

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

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions