Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Hide empty options in usage output #55

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

matiassingers
Copy link

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.

@jankowiakmaria
Copy link

Could someone review this PR?

@matiassingers
Copy link
Author

bump 👍

@matiassingers
Copy link
Author

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants