-
Notifications
You must be signed in to change notification settings - Fork 13
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
[Question] Optional unordered key/value pairs ? #22
Comments
Hey @tianalemesle. Cliffy doesn't currently support "options" with associated values like in your example. We only support unlabeled parameters. It's an interesting idea, so I'll think about how we might add support in the future. Here is what the call would look like with cliffy: Here's an example implementation:
Short explanationIn cliffy, "options" are specified using the |
Yes, I've carfully read the README, and had to use cli
.command(
'list',
'List hooks'
)
.option('--limit <limit>', 'Limit')
.option('--status <status>', 'Filter by pending/completed/failed status')
.option('--sortBy <sortBy>', 'Sort by creation/post date')
.option('--sortOrder <sortOrder>', 'Sort asc/desc')
.option('--minPostDate <minPostDate>', 'Filter by min post date')
.option('--maxPostDate <maxPostDate>', 'Filter by max post date')
.option('--minCreationDate <minCreationDate>', 'Filter by min creation date')
.option('--maxCreationDate <maxCreationDate>', 'Filter by max creation date') All those options need to be optional, unordered and associated with values. |
Yeah. Not fully supported yet. You can do optional parameters however. |
Yes, but ordered, which means an optional parameter cannot be specified without specifying the previous optional ones. |
Hello, |
Hello,
How can I do the following using
cliffy
?--param2=foo --param1=bar --param3
Thanks
The text was updated successfully, but these errors were encountered: