Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add command to recursively print help #85

Open
cllns opened this issue Feb 7, 2020 · 4 comments
Open

Add command to recursively print help #85

cllns opened this issue Feb 7, 2020 · 4 comments
Labels
feature In progress Issue is taken in work

Comments

@cllns
Copy link
Member

cllns commented Feb 7, 2020

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 #55 (comment)
This request from @kigster #55 (comment)

@cllns cllns added the feature label Feb 7, 2020
@kigster
Copy link

kigster commented Jul 22, 2020

I'll see if I have time to look at it... I want to.

@kigster
Copy link

kigster commented Aug 24, 2020

One common flag I've seen being used is --longhelp.

For instance mp3 transcoding tool lame has that flag.

@IvanShamatov
Copy link
Member

AHHHH, I got it wrong all the time until now.
Good point. Will do that

@IvanShamatov IvanShamatov added the In progress Issue is taken in work label Feb 9, 2021
@kigster
Copy link

kigster commented Mar 10, 2021

Honestly --help-all or --help-recursive or --help-commands are all decent options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature In progress Issue is taken in work
Projects
None yet
Development

No branches or pull requests

3 participants