Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
RaphGL opened this issue Sep 5, 2024 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@RaphGL
Copy link
Owner

RaphGL commented Sep 5, 2024

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)

@RaphGL RaphGL added the enhancement New feature or request label Sep 5, 2024
@RaphGL RaphGL changed the title add ability to define short, long flags and combine short flags flag: add ability to define short, long flags and combine short flags Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant