Skip to content
Myr

Merge pull request #382 from claylo/master

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Given git-style sub-commands, display help if none called

authored by Randall Koutnik · committed by Randall Koutnik · parents ada4787, 7a2fad3 · Browse files · 2 files+18 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+18 added−0 removed

  • tests:+12 added−0 removed
  • other:+6 added−0 removed

2 files+18 added−0 removed

modified:test/test.command.name.js+12 added
modified:index.js+6 added
441 unmodified lines
442443 // guess name444 this._name = this._name || basename(argv[1], '.js');445446 // github-style sub-commands with no sub-command447 if (this.executables && argv.length < 3) {448 // this user needs help449 argv.push('--help');450 }451452 // process argv453 var parsed = this.parseOptions(this.normalize(argv.slice(2)));454 var args = this.args = parsed.args;455
634 unmodified lines