visionmedia/commander.js — pull request #103 by millermedeiros (2012-11-05 22:02:49+00:00)
Title: Add variadic arguments to commands and options. see #53

Will be easier to handle sub-commands that accepts multiple arguments, like:

program
.command("new [FILES...]")
.action(function(name, files) {
console.log(files);
})
.parse(process.argv);

$ program new cool foo bar bad
> ["foo", "bar", "baz"]

Added same functionality for Options as well:

program
.option('-f, --files ', 'file paths')
.parse(process.argv);
console.log( program.files );

$ program -f foo.js bar.js baz.js
> ["foo.js", "bar.js", "baz.js"]

---

based on feature request #53