menu
menu copied to clipboard
Add support for quoted arguments containing spaces
Hello,
I'd like to add support for quoted arguments that contain spaces. Please feel free to suggest improvements, it's not exactly a pretty change. Rebuilding the arguments character by character from [u8; 32] is maybe a limiting approach. Anyways suggestions are welcome.
The current result of the main branch is this:

The result under the changes of this pull request is this:

Opinions on this @thejpster?
I haven't opened the diff yet but the reason I didn't do this is so I could always sub slice the input buffer. If you have to trim escaping backslashes then you can't. Or rather, you have to mutate the input buffer to trim the escapes.
So, not impossible, but it required extra work.
Ok, let me go look!
Another option could be a Raw parameter type, which just gives everything to the handler as one long string. The handler can then do its own parsing and de-escaping.