philmasterplus
Active member
@MCroft If we're after a general solution, I'm still in favor of surrounding/escape characters. It's a bigger effort than changing just one command. But it benefits every command that accepts multiple items, effects, etc.
Any clever parsing trick has pitfalls. What if there are three different items whose names are:
Your concern for "pain for scripters" may be valid but overblown. If we implement surrounding/escape chars, what was broken (item names with commas passed as gCLI tokens) will be fixed. What was working (item names w/o commas passed as gCLI tokens) will still work. If users cannot be bothered to escape item names with commas themselves, we can provide an ASH function like
Any clever parsing trick has pitfalls. What if there are three different items whose names are:
- Red
- Rusty Sword
- Red, Rusty Sword
<command> red, rusty sword
be parsed? Given the nature of KoL, we can't guarantee that such ridiculous item names would never pop up in the future. A surrounding (``
) or escape character (\
) would provide a more robust solution.Your concern for "pain for scripters" may be valid but overblown. If we implement surrounding/escape chars, what was broken (item names with commas passed as gCLI tokens) will be fixed. What was working (item names w/o commas passed as gCLI tokens) will still work. If users cannot be bothered to escape item names with commas themselves, we can provide an ASH function like
string cli_token_escape(string name)
, either as a built-in or a userland function (i.e. ZLib).
Last edited: