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

Remove [command [command options]] from help text if there are no sub commands #1921

Open
marwan-at-work opened this issue Jun 5, 2024 · 1 comment
Labels
area/v3 relates to / is being considered for v3 status/triage maintainers still need to look into this

Comments

@marwan-at-work
Copy link
Contributor

Hi there,
I think it would help readability a lot if cli/v3 can check for subcommands first before printing the help of a command.

For example, right now this is the help that I get:

NAME:
   app cmd1 cmd2 - does something cool

USAGE:
   app cmd1 cmd2 [command [command options]] <myArgUsage>

OPTIONS:
   --flag value  (default: 1)
   --help, -h     show help (default: false)

Note that cmd2 has no sub-commands which makes it distracting from reading and understanding the USAGE. So what I'd love to instead see is:

NAME:
   app cmd1 cmd2 - does something cool

USAGE:
   app cmd1 cmd2 <myArgUsage>

OPTIONS:
   --flag value  (default: 1)
   --help, -h     show help (default: false)
@marwan-at-work marwan-at-work added status/triage maintainers still need to look into this area/v3 relates to / is being considered for v3 labels Jun 5, 2024
@dearchap
Copy link
Contributor

@marwan-at-work want to make a PR for me to review for this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/v3 relates to / is being considered for v3 status/triage maintainers still need to look into this
Projects
None yet
Development

No branches or pull requests

2 participants