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

Multiple selection list #121

Closed
quimm2003 opened this issue Jun 26, 2018 · 6 comments
Closed

Multiple selection list #121

quimm2003 opened this issue Jun 26, 2018 · 6 comments

Comments

@quimm2003
Copy link

quimm2003 commented Jun 26, 2018

Hi there!

Thanks for your awesome work!

I guess it would be useful a list type to create a select multiple element, which passes a list with the selections to the script's parameter.

For example, I use a script to issue a "git status --porcelain" to get a list of modified and untracked files. I want some of this files to be processed by the script.

Thanks.

@bugy
Copy link
Owner

bugy commented Jun 26, 2018

Hi @quimm2003, thanks for the new proposal. Sounds reasonable.
How would you expect these multiple values to be passed to your script? As comma-separated values or as positional arguments?
e.g.
my_script.sh --files file1.txt,file2.txt
OR
my_script.sh --files file1.txt file2.txt

Or may be in a completely different way?

@bugy bugy added the feature label Jun 26, 2018
@quimm2003
Copy link
Author

Hi @bugy,

my script expects the file paths to be passed as positional arguments. e.g.: my_script [options] file1 file2. Nevertheless, it will be easy to adapt my script to any of your proposals.

@bugy
Copy link
Owner

bugy commented Jun 26, 2018

Hi @quimm2003, got it, thanks. For me it doesn't matter much, how to implement it.
Unfortunately the estimate delivery time for this feature will be not less than 2 weeks (probably around end of July), because of other issues. Hopefully it's not that bad for you

@quimm2003
Copy link
Author

Thank you very much @bugy! No, it is not bad... I can still launch the script at command line... ;-)

@bugy
Copy link
Owner

bugy commented Jul 17, 2018

Added multiselect parameters support. Type name: multiselect
The values will be passed to the script either as a single parameter (comma-separated by default) - this is default behaviour. Or as multiple arguments
This can be configured via 2 options:
multiple_arguments (boolean) - if True, then each value will be passed as a separate argument. separator will be ignored. Default: False
separator (string) - which separator should be used for single-arg mode. Can be any string. Default: ","

Possible values can be specified with "values" option (the same as in list type)
Default values should be specified as a JSON array (single default value can be specified as a string as well).

@bugy bugy added the resolved label Jul 17, 2018
@quimm2003
Copy link
Author

Works like a charm! Thank you very much @bugy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants