Open clue opened 10 years ago
I've just released a rather sophisticated command line parser which can in fact parse the above commands just fine: https://github.com/clue/php-arguments
However, the Redis' inline protocol parser actually has some quirks I'm not sure we should try to reproduce here.
"he"llo
is rejected, while `he"llo" is accepted (whitespace required only after quotes, not around). This differs from usual terminal interpretation where missing whitespace is actually ignores so this resolves to a single argument.""
is ignored instead of accepting this as an empty string.Arguably, these are certainly edge cases and unlikely what you average user would send. It looks like some of these could actually be considered bugs rather than features, so I'm currently undecided what we should do here.
The old inline protocol is mostly obsolete, but some kind of support for this would still be nice:
Afaict, redis 2.8 added support for quotes, whereas redis 2.6 actually added a key named
"a"
with a valud of"abc"
(yes, both including the quotes).