php-simple-console icon indicating copy to clipboard operation
php-simple-console copied to clipboard

Suggestion: Ignore single-letter option values by default

Open MrPetovan opened this issue 6 years ago • 4 comments

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:

  • "command"

Options:

  • p: 1

But if the order is reversed the result is completely different:

bin/console -p command Arguments: none

Options:

  • p: "command"

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?

MrPetovan avatar Mar 19 '18 04:03 MrPetovan