nomnom icon indicating copy to clipboard operation
nomnom copied to clipboard

Hide empty options in usage output

Open matiassingers opened this issue 10 years ago • 3 comments

If you only specify options that are all set at hidden: true then the usage output will still display the empty options list.

Current behavior:

$ cli -h

Usage: cli <command> [options]

command
  foo       bar
  baz      foo

Options:

Fixed output:

$ cli -h

Usage: cli <command>

command
  foo       bar
  baz      foo


I edited the test that was currently expecting that empty options list, but it's just not very clean to add the options list if none of the options are shown. Seem weird.

matiassingers avatar Jan 27 '15 11:01 matiassingers

Could someone review this PR?

jankowiakmaria avatar May 19 '15 12:05 jankowiakmaria

bump :+1:

matiassingers avatar Jul 09 '15 08:07 matiassingers

@harthur did you get a change to review this PR?

matiassingers avatar Sep 07 '15 10:09 matiassingers