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

Support multiple answers #3

Open
balupton opened this issue Nov 6, 2017 · 1 comment
Open

Support multiple answers #3

balupton opened this issue Nov 6, 2017 · 1 comment

Comments

@balupton
Copy link

balupton commented Nov 6, 2017

From the README it does not seem this is currently supported - forgive me if it is

It would be nice if choices allowed one to select multiple answers, such as iterating through the list by pressing up+down arrow keys, and pressing space bar to select an item, then enter to proceed. (option 1)

Alternatively (option 2) space bar as well as enter could be used to select items, with an option at the end called "Proceed" or "Done" or whatever, that went space/enter is used on then it proceeds. However, I prefer option 1

Use case for me, in bash for now, is turning the former into the latter:

if confirm "Install Amphetamine?"; then
	mas install 937984704
fi
if confirm "Install HazeOver?"; then
	mas install 430798174
fi
if confirm "Install Magnet?"; then
	mas install 803453959
fi
if confirm "Install Wire?"; then
	mas install 931134707
fi
if confirm "Install XCode?"; then
	mas install 497799835
fi
items="$(multiselect 'Which would you like to install?' 'Amphetamine' 'HazeOver' 'Magnet' 'Wire' 'XCode')"
if test "$items" == *"Amphetamine"*; then
	mas install 937984704
fi
if test "$items" == *"HazeOver"*; then
	mas install 430798174
fi
if test "$items" == *"Magnet"*; then
	mas install 803453959
fi
if test "$items" == *"Wire"*; then
	mas install 931134707
fi
if test "$items" == *"XCode"*; then
	mas install 497799835
fi
@Markcial
Copy link
Owner

Markcial commented Nov 7, 2017

Sounds like a cool feature, do you know where to start? Or just thinking out loud about the idea?

I do not mind diggin a bit into that, but might not be able to find time until the weekend.

Ping me back if you want to work on that, if not i will check if it's any way to add the feature

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