harthur / nomnom

Option parser for node with generated usage and commands
MIT License
470 stars 62 forks source link

Quoted negative values shouldn't be treated as options #37

Open mojodna opened 10 years ago

mojodna commented 10 years ago

Arguments that begin with a - are considered options, not values, even when they're quoted:

test.js:

require("nomnom")
  .options({
    bbox: {
      abbr: "b"
    }
  })
  .parse();
$ node test.js -b "-118.9448 32.8007 -117.6462 34.8233"
'-bbox' expects a value

Usage: node test.js [options]

Options:
   -b, --bbox