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

Help usage is incorrect for getting help about specific commands #217

Closed
karenewlees opened this issue Jan 6, 2023 · 2 comments
Closed

Comments

@karenewlees
Copy link

karenewlees commented Jan 6, 2023

I typed: fcli -h and the usage statement provided is:
Usage: fcli [-V] [[-h] [--env-prefix=] [--log-file=] [--log-level=]] [COMMAND]

Following the usage description, I typed: fcli -h tool, but this gave me the same help content as the first command: fcli -h.

I then tried: fcli tool -h and this command gave me information about the tool command.

The usage statement is incorrect. However, it seems more logical to type: fcli -h to get help on a command. IMHO
fcli version 1.0.4, built on 2023-01-05 11:51:09

@rsenden
Copy link
Contributor

rsenden commented Jan 12, 2023

I guess this is a matter of interpretation/expectation. The help output displays the following:

Generic fcli options:
  -h, --help                 Show this help message and exit

So, this states that the -h option displays this help message only; there is no mention that this option can be used for displaying help for sub-commands. If that had been the case, it would probably also have been more logical if the synopsis had shown something like [-h [command]] to explicitly state that the help option supports an argument specifying for which command you'd want to display the help information.

This behavior is consistent with other commonly used CLI tools, for example kubectl -h create displays the help output for the top-level kubectl command; you'd need to use kubectl create -h to display the help output for the create command.

So, this is working as designed, but I'll update the description for the -h option to make it more clear how to obtain help for sub-commands.

@karenewlees
Copy link
Author

karenewlees commented Jan 12, 2023

Thanks for considering and updating the description. My expectation was that it works similar to SC SAST CLI which specifies that you type scancentral -h <command> to get help with the specific <command>. For example: scancentral -h worker

@github-actions github-actions bot mentioned this issue Aug 13, 2024
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

2 participants