Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove line after Arguments title in help #1360

Merged
merged 1 commit into from Sep 24, 2020

Conversation

shadowspawn
Copy link
Collaborator

@shadowspawn shadowspawn commented Sep 24, 2020

Pull Request

Problem

The "Arguments:" title in the help has a trailing blank line, unlike the "Options:" and "Commands:".

const { program } = require('commander');

program
  .arguments('<source> <dest>')
  .description('copy elements from source to dest', {
    source: 'source for elements',
    dest: 'dest for elements'
  });

program
  .option('-g, global', 'global option')
  .command('sub', 'demo sub command');

  program.parse();
% node sections.js --help
Usage: sections [options] [command] <source> <dest>

copy elements from source to dest

Arguments:

  source          source for elements
  dest            dest for elements

Options:
  -g, global      global option
  -h, --help      display help for command

Commands:
  sub             demo sub command
  help [command]  display help for command

Solution

Remove the extra blank line.

% node sections.js --help
Usage: sections [options] [command] <source> <dest>

copy elements from source to dest

Arguments:
  source          source for elements
  dest            dest for elements

Options:
  -g, global      global option
  -h, --help      display help for command

Commands:
  sub             demo sub command
  help [command]  display help for command

ChangeLog

  • remove extra blank line after "Arguments:" in help

Copy link
Collaborator

@abetomo abetomo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@shadowspawn shadowspawn merged commit 9236449 into tj:develop Sep 24, 2020
@shadowspawn shadowspawn deleted the feature/argument-break branch September 24, 2020 20:13
@shadowspawn shadowspawn added the pending release Merged into a branch for a future release, but not released yet label Sep 24, 2020
@shadowspawn shadowspawn removed the pending release Merged into a branch for a future release, but not released yet label Oct 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants