Open virtualdreams opened 1 year ago
I second this. There's no easy way of knowing whether a parameter was supplied without value or if it was omitted, and those are two different kinds of failure for us.
Why would this throw an error? You have required = false
in the Option attribute...
theres a third scenario:
cli --value
cli --value blah
cli --value --othervalue
Effectively 1 and 3 are the same
Required
requires the option. This has nothing todo with the requirement of an option value.
https://github.com/commandlineparser/commandline/wiki/Option-Attribute
Required | Gets or sets a value indicating whether a command line option is required. |
---|
A string option should also force a value as with getopt
has_arg
https://man7.org/linux/man-pages/man3/getopt.3.html
If I have a string option and it is called without a value, no error is thrown. This is what I would expect.
If i call this command line i get no error.