Thanks Bryce, now we have three options that work :-)
We only want to know if -x is set and nothing else - and we don't want to have to know what potential options there are - in the case above I don't want to care if one day there is a valid "-V 8" and update the getopt string.
To be clear, for full parsing your suggestion is great, but that isn't what I want/need here.
Therefore I'd prefer the small version I have proposed which achieves exactly that and nothing more but therefore also saves some complexities and hopefully will need no updates (that we might forget on merges) down the road.
Thanks Bryce, now we have three options that work :-)
We only want to know if -x is set and nothing else - and we don't want to have to know what potential options there are - in the case above I don't want to care if one day there is a valid "-V 8" and update the getopt string.
To be clear, for full parsing your suggestion is great, but that isn't what I want/need here.
Therefore I'd prefer the small version I have proposed which achieves exactly that and nothing more but therefore also saves some complexities and hopefully will need no updates (that we might forget on merges) down the road.