We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi! Could a flag be used with parameter and without parameter simultaneously?
For example smth like: #define INT_DEFAULT_VALUE 10 OPT_BOOLEAN('f', "force", &force, "force to do", NULL, 0, 0), OPT_INTEGER('i', "int", &int_num, "selected integer", NULL, 0, 0), //some way to transfer INT_DEFAULT_VALUE inside parser
my cmd -i 15 -f
force: 1 int_num: 15
Now it outputs next string: my cmd -i -f
[int_num: 15](error: option -i expects an integer value)
-i
But could the parameter be used with a default value like this: my cmd -i -f
force: 1 int_num: 10
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi! Could a flag be used with parameter and without parameter simultaneously?
For example smth like:
#define INT_DEFAULT_VALUE 10
OPT_BOOLEAN('f', "force", &force, "force to do", NULL, 0, 0),
OPT_INTEGER('i', "int", &int_num, "selected integer", NULL, 0, 0), //some way to transfer INT_DEFAULT_VALUE inside parser
my cmd -i 15 -f
Now it outputs next string:
my cmd -i -f
But could the parameter be used with a default value like this:
my cmd -i -f
The text was updated successfully, but these errors were encountered: