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

Wrong cli argument should display more detailed command help #882

Closed
benoittgt opened this issue Jul 29, 2024 · 1 comment
Closed

Wrong cli argument should display more detailed command help #882

benoittgt opened this issue Jul 29, 2024 · 1 comment

Comments

@benoittgt
Copy link

benoittgt commented Jul 29, 2024

Hello

While working on Thor command of a project I thought that on error on argument, Thor could be more helpful.

My proposal. Before

$ ruby enum_demo.rb start -v
ERROR: "enum_demo.rb start" was called with arguments ["-v"]
Usage: "enum_demo.rb start"

After

ruby enum_demo.rb start -v
ERROR: "enum_demo.rb start" was called with arguments ["-v"]

Usage:
  enum_demo.rb start

Options:
  -d, [--debug], [--no-debug], [--skip-debug]  
                                               # Default: false
  -h, [--help], [--no-help], [--skip-help]     
                                               # Default: false

Start the application

I already made a quick hack but before going further I would like to get some feedbacks about this idea of output.

The help output with Thor command seems to be a subject (#524, #402, #375, #661, etc). I am wondering if it would be wanted to fix some of issues. I can look at it, but first I would like to be sure about what we want to accept as a proper CLI help interface.

@benoittgt
Copy link
Author

I'm gonna close this because it probably require more work than I did.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant