aio-cli icon indicating copy to clipboard operation
aio-cli copied to clipboard

new oclif readme generator produces command output for aliases as well

Open shazron opened this issue 3 years ago • 4 comments

This will pollute the README with duplicate command help.

Related https://github.com/oclif/oclif/issues/888

shazron avatar Jul 26 '22 16:07 shazron

Readme command: https://github.com/oclif/oclif/blob/main/src/commands/readme.ts

Where the list of commands are set: https://github.com/oclif/core/blob/f759fb1710eb1013a48fa04e817d43231553590a/src/config/config.ts#L615-L621

The only approach I can think is to add a filter here: https://github.com/oclif/oclif/blob/fb5da961f925fa0eba5c5b05c8cee0c9bd156c00/src/commands/readme.ts#L57

  • if c.id exists in c.aliases, remove it from the list.

shazron avatar Jul 27 '22 05:07 shazron

Just tested it, it works:

.filter(c => !c.aliases.includes(c.id))

shazron avatar Jul 27 '22 05:07 shazron

PR https://github.com/oclif/oclif/pull/925

shazron avatar Jul 27 '22 06:07 shazron

JIRA issue created: https://jira.corp.adobe.com/browse/ACNA-1742

aiojbot avatar Aug 11 '22 12:08 aiojbot

Fixed in https://github.com/oclif/oclif/releases/tag/v3.2.0 (dev dep for all our plugins and cli)

shazron avatar Sep 07 '22 02:09 shazron