Function format

  • Formats a help message with sections. Options are rendered in the same order as was declared in the option definitions.

    Parameters

    • options: Readonly

      The option definitions (should be validated first)

    • sections: HelpSections = defaultSections

      The help sections

    • filter: readonly string[] = []

      The option filter

    • progName: string = ''

      The program name, if any

    Returns AnsiMessage

    The formatted help message