nomnom icon indicating copy to clipboard operation
nomnom copied to clipboard

unspecified/undefined options should be treated as flags unless followed by a value

Open GerHobbelt opened this issue 10 years ago • 0 comments

feature request: If you do not define option --bugger (via the .options() method or other nomnom API) then nomnom requires it to be followed by a value, i.e.

  --bugger 1

is okay, while

  --bugger

will print an error report: 'bugger expects a value'.

Since accepting unspecified/undefined options seems to be a feature of nomnom (several existing tests expect this behaviour), then it makes sense to also accept --bugger as in the example above and treat it as a flag option: opts.bugger === true

GerHobbelt avatar Jun 09 '15 12:06 GerHobbelt