Gabriella439 / Gabriella439/optparse-generic
How can you populate multi command help
- Dominant language
- Haskell
- Stars
- 215
- Forks
- 36
- PR merge metrics
- No merged PRs in 30d
Description
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
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by examining how multi-command help is generated and how command definitions are translated to the underlying Options.Applicative representation. Determine how descriptions for hello and goodbye could be supplied, then verify that generated help includes those descriptions under Available commands.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100