Skip to content

multiple positionals #265

@tcurdt

Description

@tcurdt

I tried this, but it seems it is not supported.

type argsApply struct {
	FindExpressions   []ArgFind   `arg:"positional" help:"find"`
	ActionExpressions []ArgAction `arg:"positional,required" help:"actions"`
}

The usage prints look like it could work.

apply [FINDEXPRESSIONS [FINDEXPRESSIONS ...] ACTIONEXPRESSIONS [ACTIONEXPRESSIONS ...]]

But the unmarshaling of the "find" type creates an error and then the processing stops.
I was hoping it would then switch to the next "action" type.

Question is whether this is something that should work or not.

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