Specifies whether or not a NDesk.Options.Option takes a value, and if it does, whether it's optional or required.
|
Member name | Description |
---|---|
None |
No value is taken. If an option takes no value, then the callback function will receive null if the value is false (e.g. -optionName- was used) and non-null if the value is true (e.g. -optionName, -optionName+). |
Optional |
A value is optional. This is specified by providing : after the option name within Option.Prototype. If a value is optional, the callback function will receive null value if no value is provided, and will otherwise receive a non-null value. Options with optional values are not "greedy" -- the value must be part of the current argument, e.g. -opt:foo will pass "foo" as the value to -opt, but -opt foo will pass null as the value to -opt. |
Required |
A value is required. This is specified by providing = after the option name within Option.Prototype. Options with required values are "greedy" -- if the current argument does not contain a value, the next argument will be used as the value, e.g. both -opt:foo and -opt foo will pass "foo" as the value to -opt. |