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

multiple positionals #265

Open
tcurdt opened this issue Aug 18, 2024 · 0 comments
Open

multiple positionals #265

tcurdt opened this issue Aug 18, 2024 · 0 comments

Comments

@tcurdt
Copy link

tcurdt commented Aug 18, 2024

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.

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