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

Use multiple inputs for options #71

Open
inkrement opened this issue Jan 11, 2017 · 2 comments
Open

Use multiple inputs for options #71

inkrement opened this issue Jan 11, 2017 · 2 comments

Comments

@inkrement
Copy link

Is it possible to access/use options with multiple words as input?

somecommand.php --countries usa gb fr

I tried it, but $hello_cmd['countries'] returns just the first (in this case usa).

@oliver-la
Copy link

oliver-la commented Apr 19, 2017

You have to use somecommand.php --countries "usa gb fr" instead.
This applies to every CLI application.

There is no "fix" for that. "usa" will be interpreted as flag argument, and the other two are just regular arguments.

@Rockburner
Copy link

Rockburner commented Oct 14, 2019

Lots of CLI scripts allow multiple instances of a 'flag' (as opposed to an option) to be passed.
eg:
$ command.php -p primary -a first-alternate -a second-alternate -a third-alternate -c third-option
Commando doesn't seem to allow this, but it would be very useful if anyone was going to look into it?

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

No branches or pull requests

3 participants