TanklesXL / glint

Gleam command-line argument parsing with flags and automated help text generation.
https://hex.pm/packages/glint
Apache License 2.0
50 stars 7 forks source link

Add the ability to provide a description for parent commands. #34

Closed hayleigh-dot-dev closed 2 months ago

hayleigh-dot-dev commented 3 months ago

I have two commands add esbuild and add tailwind. If I run --help on the overall program I get:

% gleam run -m lustre/dev -- --help
  Compiling lustre_dev_tools
   Compiled in 0.17s
    Running lustre/dev.main
USAGE:
    gleam run -m lustre/dev [ ARGS ]

SUBCOMMANDS:
    add

I'd like to add a description for what the add family of commands do, without writing a proper command for it.

TanklesXL commented 2 months ago

This is a good idea, would you want this help text to apply only to the path you specify, or perhaps also for all subcommands of the provided path?

i'm thinking something like

glint.new()
// ...
|> glint.path_help(["add"], "Some awesome help text")
// ...