vanilla/garden-cli

Allow Format -o=value or --option=value

Closed this issue · 3 comments

This is more of a feature request than an actual issue, but still:

Please add an option to allow the equals symol to be used as a seperator for option name and value.
Right now you have no seperator at all or space (and thus a new element in argv) as a separator.
Having the = like the getopt from php does would be very welcome here.

Thanks in advance.

The CLI supports the equals sign for the long form arguments, but not the short form. That's a sensible request though.

Oh, apparently I only tried it with the short form.
Must have overlooked the fact that long form allows = as separator, even though I looked into the sourcecode just for that purpose...

Thanks for considering it, though.

Okay I added support for short = separators in 8d46ebb which goes out in version 1.3.0. I also added a few more unit tests for some edge cases, but I may not have caught everything. If you have any issues open an issue and I'll fix.