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

metavar isn't displayed with --help #64

Open
lehins opened this issue Sep 18, 2018 · 0 comments
Open

metavar isn't displayed with --help #64

lehins opened this issue Sep 18, 2018 · 0 comments

Comments

@lehins
Copy link
Contributor

lehins commented Sep 18, 2018

Not sure if it's me doing something wrong, but it looks like metavar in specified in cli doesn't get displayed when invoked with --help, or failed parsing for that matter.

It is critical for positional arguments, otherwise there is no way to know why parsing has failed or how to properly use the command.

  foo:
    etc/spec:
      type: number
      cli:
        input: option
        metavar: FOO_METAVAR
        required: true
        long: foo
        help: "foo does something cool, but doesn't have it FOO_METAVAR displayed"
        commands:
        - run

Results in:

$ my-cmd run --help
Usage: my-cmd run --foo ARG

Available options:
  -h,--help                Show this help text
  --foo ARG                foo does something cool, but doesn't have it
                           FOO_METAVAR displayed
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