I am using getopt to parse inputs for a CLI written in C++. I have long and short options and my struct long_options[] element looks like this:
{"verbose", no_argument, NULL, "v"}
One observation is - on the command line, even if I pass
# mycommand --verb
it still accepts that and routes to the function that handles the verbose behavior. Is there any way to make getopt do a strict option check? It shouldn't accept --verb as --verbose right?