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

New Feature : Allow for array in flag options #22

Open
elmatou opened this issue Mar 4, 2022 · 0 comments
Open

New Feature : Allow for array in flag options #22

elmatou opened this issue Mar 4, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@elmatou
Copy link

elmatou commented Mar 4, 2022

Would be really usefull if options could take a list of values
currently if I need to pass a list of value for a given option I have to repeat the flag :

bin -a fr -a be -a us
# will return { ..... a: ['fr', 'be', 'us'] }

What if we could parse :

bin -a fr,be,us
# and return { ..... a: ['fr', 'be', 'us'] }

of course there will be a debate on the separator, which should be an option.
This behavior could be trigger with the array option, if a separator option is provided.

just check this :

"a,z,e,r,t".split(undefined) // Array [ "a,z,e,r,t" ]
"a,z,e,r,t".split(',') // Array(5) [ "a", "z", "e", "r", "t" ]

Anybody interested in this ?

@elmatou elmatou changed the title New Feature : Allow for array in options New Feature : Allow for array in flag options Mar 4, 2022
@meszaros-lajos-gyorgy meszaros-lajos-gyorgy added the enhancement New feature or request label Mar 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants