Skip to content

New help text layout option and hook for generating custom help text #183

Open
@Xunnamius

Description

@Xunnamius

Two things:

  1. Implement showHelpOnFail.layout with two options: 'default', which is the current behavior (yargs::showHelp), and 'single-column', which emulates typescript's help text layout (npx tsc --help).

  2. Implement configureHelpTextLayout hook, which receives context (including meta and programs for each command) and the help text that would have been output with respect to showHelpOnFail.layout, and returns a string that will be output to the terminal as the help text.

TypeScript's (tsc) single-column help text looks really nice, and makes optimal use of the available terminal width. Eventually, I'd like to use it for my own CLI projects.

Time horizon is unbounded on this one, though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions