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

print usage when missing subcommand #86

Closed
andrewdavidmackenzie opened this issue Dec 24, 2018 · 1 comment
Closed

print usage when missing subcommand #86

andrewdavidmackenzie opened this issue Dec 24, 2018 · 1 comment

Comments

@andrewdavidmackenzie
Copy link
Member

Current situation

When you use a command and forget a required subcommand, say:

$ 3scale import

You get a "dry" response that doesn't help much.

import: no command given

So, you need to ask for help:

$ 3scale help import
NAME
    import - 3scale import command

USAGE
    3scale import <command> [options]

DESCRIPTION
    3scale import command.

SUBCOMMANDS
    csv     Import csv file

OPTIONS FOR 3SCALE
    -h --help          show help for this command
    -k --insecure      Proceed and operate even for server connections
                       otherwise considered insecure
    -v --version       Prints the version of this command

This helps a lot more and now I know that import requires a sub-command, such as csv

Proposed Change

When a command requires a subcommand and it is not supplied, print out the help for that command directly.

@andrewdavidmackenzie
Copy link
Member Author

Note, this applies to the basic "no command" case also:

$ 3scale
3scale: no command given

Printout the usage/help no?

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