-
Notifications
You must be signed in to change notification settings - Fork 309
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
Support documentation for strict = false
command arguments
#234
Comments
@mattgibson did you find a solution to this? My only idea right now is to declare the optional arg and then try and parse it out. I've got the following: export class MyCLI extends Command {
static strict = false
static args = [
{name: 'firstArg', required: true},
{name: 'secondArg'},
]
async run() {
this.log(this.args)
this.log(this.argv)
}
} expected:
actual:
If I leave off cc @RasPhilCo |
Added an issue in plugin-help to have it there also. @xavdid looks like the parser could handle that more clearly, but I'll have to dig in deeper. |
Thanks a bunch! let me know if there's anything I can do to help |
any update on this? |
Do you want to request a feature or report a bug?
Feature.
What is the current behavior?
If I specify
strict = false
and useargv
to access whatever variable length string of arguments the user provides, there is no way to document this. The README doesn't mention that there is an arbitrary list of arguments accepted and if I specify this manually by editing the command form e.g.Then it gets overwriten next time I run
npx oclif command
to add a new one.What is the expected behavior?
(@oclif/command@1.5.13 on macOS) That I can add documentation similar to that for flags with multiple arguments, which will show up in the README and when using the
--help
flag.The text was updated successfully, but these errors were encountered: