Skip to content
Myr

removed newline after options and commands headers

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

authored by Jared Petersen · committed by Roman Vanesyan · parent 4c294c1 · Browse files · 6 files+5 added−18 removed
This commit

State

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

Diff stats

6 files+5 added−18 removed

  • tests:+2 added−5 removed
  • other:+3 added−13 removed

6 files+5 added−18 removed

modified:test/test.command.help.js+2 added-2 removed
modified:test/test.command.helpInformation.js-2 removed
modified:test/test.command.nohelp.js-1 removed
modified:index.js-2 removed
1071 unmodified lines
1072 var width = this.padWidth();10731074 return [1075 'Commands:',1076 '',1076 commands.map(function(cmd) {1077 var desc = cmd[1] ? ' ' + cmd[1] : '';1078 return (desc ? pad(cmd[0], width) : cmd[0]) + desc;1079 }).join('\n').replace(/^/gm, ' '),
42 unmodified lines
1122 if (commandHelp) cmds = [commandHelp];11231124 var options = [1125 'Options:',1127 '',1126 '' + this.optionHelp().replace(/^/gm, ' '),1127 ''1128 ];1129
106 unmodified lines
modified:Readme_zh-CN.md+3 added-7 removed
190 unmodified lines
191192An application for pizzas ordering193194Options:195195 -h, --help output usage information196 -V, --version output the version number197 -p, --peppers Add peppers198 -P, --pineapple Add pineapple
25 unmodified lines
224// node's emit() is immediate225226program.on('--help', function(){227 console.log('');229 console.log(' Examples:');230 console.log('');231 console.log(' $ custom-help --help');232 console.log(' $ custom-help -h');228 console.log('Examples:');229 console.log(' $ custom-help --help');230 console.log(' $ custom-help -h');231});232233program.parse(process.argv);234
5 unmodified lines
240```241Usage: custom-help [options]242243Options:246244 -h, --help output usage information245 -V, --version output the version number246 -f, --foo enable some foo247 -b, --bar enable some bar248 -B, --baz enable some baz249250Examples:254251 $ custom-help --help252 $ custom-help -h253```254
79 unmodified lines
modified:Readme.md-4 removed
252 unmodified lines
253254An application for pizzas ordering255256Options:257257 -h, --help output usage information258 -V, --version output the version number259 -p, --peppers Add peppers260 -P, --pineapple Add pineapple
31 unmodified lines
292293program.on('--help', function(){294 console.log('')295 console.log('Examples:');297 console.log('');296 console.log(' $ custom-help --help');297 console.log(' $ custom-help -h');298});299
7 unmodified lines
307```308Usage: custom-help [options]309310Options:313311 -h, --help output usage information312 -V, --version output the version number313 -f, --foo enable some foo314 -b, --bar enable some bar315 -B, --baz enable some baz316317Examples:321318 $ custom-help --help319 $ custom-help -h320```321
96 unmodified lines