-
Notifications
You must be signed in to change notification settings - Fork 1
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
Suggestion: Ignore single-letter option values by default #1
Comments
Hmm, In my experience it is an expected result if you add a string just after any option tag, it will look as the option's value. I don't know what other console framework will do but this parsing method is fork from Joomla Clinput, so I just keep the same convention. Is there any other CLI program ignore single letter option that I can reference to? |
OK, I can confirm composer will ignore single letter too. If it is a convention of community, we should follow this way. |
But npm minimist uses same way as SimpleConsole. So I need more caes to research. Or simply add a property to toggle this function. |
While working on my console, I was looking at what the |
Hi and thanks for this gem of a library that I started using over at https://github.com/friendica/friendica. While it does mostly a good job parsing the command-line separating arguments and options, the order is often critical to get the intended result.
For example with an example
bin/console
:bin/console command -p
Arguments:
Options:
But if the order is reversed the result is completely different:
bin/console -p command
Arguments: none
Options:
I'd like to suggest to ignore values for single-letter options and add the possibility to declare specific options that actually expect a value.
What do you think about it?
The text was updated successfully, but these errors were encountered: