Skip to content

Mechanism to customize each part displayed by showUsage #137

@kazupon

Description

@kazupon

If you can make an issue to explain or visually share some screenshot of desired output i can help to improve built-in showUsage usable for rolldown.

Originally posted by @pi0 in #135 (comment)

The showUsage currently provided can be customized with own customized showUsage in runMain, but there is no way to customize the built-in showUsage that citty has.

The showUsage renders the following parts via renderUsage.

  • header (include, command name and versions)
  • usage or sub command
  • options

It would be useful to have a mechanism to custom render each of these parts, so that the logic of showUsage does not have to be reused.

In the rolldown use case, we would like to customize only the header.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions