decaprime / VampireCommandFramework

Framework for VRising mods to Easily build chat commands.
MIT License
5 stars 1 forks source link

🚸 Better support quoted strings and escaped quotes in strings #23

Closed decaprime closed 4 months ago

decaprime commented 4 months ago

This addresses how input command strings are split into parts, considering a command like

[Command("cmd")] void F(ICommandContext x, string arg)
  1. Addresses #22 so .cmd "a" now passes a for arg
  2. Add literal spacing to strings so .cmd " a b " now passes a b for arg
  3. Add escapes \ to strings so .cmd "hey \"pal\"" now passes hey "pal" for arg

I'm unsure if this could break any existing commands, or misses some edge case, but I think it moves the user experience forward. Overall the test suite has more coverage and I tested E2E with a plugin.