dry-cli
dry-cli copied to clipboard
Add command to recursively print `help`
Right now, --help only goes one level deep. I think we should keep it that way, but it'd be nice to have another command that recursively prints out every command (that is, print the whole tree, including subcommands).
I could see it being useful for getting an idea of all the available commands, and also something someone could pipe to grep to find the command they're looking for.
Examples
Right now:
hanami --help
Commands:
hanami assets [SUBCOMMAND]
hanami console # Starts Hanami console
hanami db [SUBCOMMAND]
...
Proposed:
hanami --help-all (Not sure what the best name would be)
Commands:
hanami assets precompile # Precompile assets for deployment
hanami console # Starts Hanami console
hanami db apply # Migrate, dump the SQL schema, and delete the migrations (experimental)
hanami db console # Starts a database console
hanami db create # Create the database (only for development/test)
hanami db drop # Drop the database (only for development/test)
hanami db migrate [VERSION] # Migrate the database
hanami db prepare # Drop, create, and migrate the database (only for development/test)
hanami db rollback [STEPS] # Rollback migrations
hanami db version # Print the current migrated version
...
Resources
This request from @unrooty https://github.com/dry-rb/dry-cli/issues/55#issuecomment-580596940 This request from @kigster https://github.com/dry-rb/dry-cli/issues/55#issuecomment-520124037
I'll see if I have time to look at it... I want to.
One common flag I've seen being used is --longhelp.
For instance mp3 transcoding tool lame has that flag.
AHHHH, I got it wrong all the time until now. Good point. Will do that
Honestly --help-all or --help-recursive or --help-commands are all decent options.