8000 First-class support for Variadic Arguments · Issue #1346 · oclif/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
First-class support for Variadic Arguments #1346
Open
@noahnu

Description

@noahnu

Is your feature request related to a problem? Please describe.

I'd like the ability to define variadic arguments.

Describe the solution you'd like

static args = {
    value: Args.string({
        multiple: true,
    })
}

console.log(this.args.value[0], this.args.value[1])

Describe alternatives you've considered

I've set "strict = false" and pulled the args from "const {argv} = await this.parse(..)" as it's called out in the docs: https://oclif.io/docs/args/. This means to use variadic arguments you lose the syntactic sugar (and documentation) of the args definition. You also lose validation (e.g. number / string / etc).

In other words, I want variadic arguments with strict parsing.

Additional context

Previous issues:

Other tools:

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedAccepting PRswaiting for interestWaiting to see if there's strong community interest

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0