-
Notifications
You must be signed in to change notification settings - Fork 22
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
Better support for "external subcommands" #251
Comments
use |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I do a lot of wrapping commands with argc. Generally, I include an escape hatch to pass arguments directly to the wrapped program, and this works well (post #232 🙏) using
argc my-command -- --foo-bar
.A useful addition to argc might be an "external subcommand" feature. Basically, when there is an external subcommand in play, as soon as an unsupported argument is found, all remaining arguments get treated as positional, even if argc would otherwise recognize them. There's a few ways this would work:
@arg args+
we use@remaining_args args+
or something (@rest
,@remainder
, ...). Must be after all@arg
, and after this starts to match, it consumes the rest of the input, ignoring further flags and options.@arg args+
we use@arg args...
or some other sigil. Same idea.@meta external_subcommand
or something which applies this rule to the last@arg
.Here's a quick example:
The text was updated successfully, but these errors were encountered: