Skip to content

How can you populate multi command help #42

@lwdye

Description

@lwdye

How can you set help strings for commands? I'm able to generate help for individual flags but not for the commands themselves. Suppose we have

data Commands = Hello{myflag::String <?> "it works!"} | Goodbye deriving (Show, Generic)

How can one generate the help "Print greeting" and "Say goodbye" for hello and goodbye as below. The mechanism is available in the underlying Options.Applicative.

Usage: commands COMMAND

Available options:
  -h,--help                Show this help text

Available commands:
  hello                    Print greeting
  goodbye                  Say goodbye

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions