Hi Wolf,
There's no need to be sorry. This is not a deal breaker in any way. I
just wanted to make my code behave similarly to the other tools I use
regularly, but this is not a hard requirement.
There are already two different routines parsing the arguments by
themselves for their needs, but parsing it once and centrally (via
gengetopt), and distributing options to the respective libraries would
be a better solution in the long run, anyway.
Thanks again for your quick answer,
Cheers,
H.
On 1/30/22 17:39, Wolf wrote:
Hello,
On 2022-01-30 11:21:13 +0300, Hakan Bayındır wrote:
This allows me to pass "-v 2" or "--verbose 2" style options to set desired
verbosity, however I want to be able to pass "-v", "-vv" and similar styled
flags for verbosity selection. I've dug version 2.23 documentation but failed
to find/understand if it's possible, and how it's done.
I don't think that is currently possible with gengetopt. At least I do
not see how to do that using the current API. Two workarounds I can
think of:
1. Use --v --vv --vvv et cetera. Does not match the typical -vv pattern,
but would work using just gengetopt.
2. Call getopt(3) separately and looks just for the -v, skipping all
unknown. There will probably be some edge cases to figure out, but
this should technically work?
Sorry I cannot give you a better answer.
Cheers,
W.
_______________________________________________
Help-gengetopt mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-gengetopt