l3nz / cli-matic

Compact, hands-free [sub]command line parsing library for Clojure.
Eclipse Public License 2.0
361 stars 29 forks source link

[Ftr] Consider adding a tip for command --help #93

Open lread opened 4 years ago

lread commented 4 years ago

Is your feature request related to a problem? Please describe. When I invoke a cli-matic with the --help option I get a nice summary of help. For example:

> ./toycalc.clj --help
NAME:
 toycalc - A command-line toy calculator

USAGE:
 toycalc [global-options] command [command options] [arguments...]

VERSION:
 0.0.1

COMMANDS:
   add, a               Adds two numbers together
   sub, s               Subtracts parameter B from A

GLOBAL OPTIONS:
       --base N  10  The number base for output
   -?, --help

But there is no indication that I can get help on a command, for example via ./toycalc.clj add --help

Describe the solution you'd like Add a tip to the overall help. Maybe something like:

NAME:
 toycalc - A command-line toy calculator

USAGE:
 toycalc [global-options] command [command options] [arguments...]

VERSION:
 0.0.1

COMMANDS:
   add, a               Adds two numbers together
   sub, s               Subtracts parameter B from A

  For help on a command follow the command with --help.

GLOBAL OPTIONS:
       --base N  10  The number base for output
   -?, --help

Describe alternatives you've considered Perhaps a way of getting all help for all options and all commands at once would be useful.

Additional context None

lread commented 4 years ago

If this makes sense to folks, I can submit a PR.

l3nz commented 4 years ago

I would not do it now, as I plan to do major changes as per #69

lread commented 4 years ago

Thanks for the reply, feel free to close this one if it makes sense to do so.