You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you have a flag that takes an array, how to make it differentiate between the values that it's supposed take and those that should just be positional arguments?
For Eg.:
create-index --filetype .js .jsx ./src
Here filetype should only take .js .jsx and ./src should be a positional argument.
It seems this isn't currently possible, right? I haven't come across this kind of use case before so I'm not sure what should the solution to this be. Is this something that should even be solved at yargs level, or should the end-user just be advised to use the cli in a way to avoid this issue altogether (create-index ./src --filetype .js .jsx)
The text was updated successfully, but these errors were encountered:
bcoe
changed the title
Flags that take array preceeded by positional arguments
feat: should we provide a way for folks to filter whether or not an argument should be appended to an array
Feb 10, 2020
If you have a flag that takes an array, how to make it differentiate between the values that it's supposed take and those that should just be positional arguments?
For Eg.:
Here
filetype
should only take.js .jsx
and./src
should be a positional argument.It seems this isn't currently possible, right? I haven't come across this kind of use case before so I'm not sure what should the solution to this be. Is this something that should even be solved at yargs level, or should the end-user just be advised to use the cli in a way to avoid this issue altogether (
create-index ./src --filetype .js .jsx
)The text was updated successfully, but these errors were encountered: