menu icon indicating copy to clipboard operation
menu copied to clipboard

Add support for quoted arguments containing spaces

Open DrewTChrist opened this issue 2 years ago • 3 comments

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: current

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

DrewTChrist avatar Apr 13 '23 23:04 DrewTChrist

Opinions on this @thejpster?

eldruin avatar Apr 24 '23 15:04 eldruin

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!

thejpster avatar Apr 24 '23 17:04 thejpster

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.

thejpster avatar Apr 24 '23 17:04 thejpster