Skip to content
Myr

Fixed #37, --help should not display first (#447)

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

authored by Victor Johnson · committed by Tomoaki Abe · parent f2eb7e3 · Browse files · 1 file+5 added−6 removed
This commit

State

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

Diff stats

1 file+5 added−6 removed

  • other:+5 added−6 removed

1 file+5 added−6 removed

modified:index.js+5 added-6 removed
931 unmodified lines
932933Command.prototype.optionHelp = function() {934 var width = this.largestOptionLength();935936 // Prepend the help information937 return [pad('-h, --help', width) + ' ' + 'output usage information']938 .concat(this.options.map(function(option) {939 return pad(option.flags, width) + ' ' + option.description;940 }))941 .join('\n');936 // Append the help information937 return this.options.map(function(option) {938 return pad(option.flags, width) + ' ' + option.description;939 }).concat([pad('-h, --help', width) + ' ' + 'output usage information'])940 .join('\n');941};942943/**944 * Return command help documentation.
185 unmodified lines