In the manual is said that "An UnlabeledValueArg is a ValueArg that is not identified by a flag on the command line. Instead UnlabeledValueArgs are identified by their position in the argv array. "
whilst reading the API documentation, seems that the name assigned in the constructor of UnlabeledValueArg can be use as long flag for the positional option:
"name - A one word name for the argument. Can be used as a long flag on the command line. "
At least the API documentation is not compliant with the manual and the constructor of UnlabeledValueArg is misleading.
At the end, it doesn't seem possible to define a positional argument that can be passed trough a prefixed flag.
For instance it is not straightforward obtain the same behaviour for the following CLI arguments:
./myexec input.txt output.txt
./myexe --myinputfile input.txt --myoutputfile output.txt
Log in to post a comment.