Skip to content

metavar isn't displayed with --help #64

@lehins

Description

@lehins

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions