You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Title says it all. It's uses should be obvious too, though I'm surprised this wasn't already considered when creating command chain functionality.
As to why it's needed, if anyone needs to know: Something like !command "Hello, I'm some \"args with quotes\"" would, with the current code, be given ["Hello, I'm some \\args", "with", "quotes\\"] (or something to that effect, I haven't tested it enough to see where and how many \ there are) as its array of parameters, instead of ["Hello, I'm some \"args with quotes\""] as you would expect.
If need be, I've hacked together a small bit of code for the beginning of this block that replicates this escaping functionality, though I doubt it fits the coding style of the rest of the code:
escaped=false@chain.each_char.each_with_indexdo |char,index|
# Escape characterifchar == '\\' && !escapedescaped=truenextelsifescapedresult += charescaped=falsenextend#blah blah blah rest of the code goes here```
The text was updated successfully, but these errors were encountered:
I've looked into this for a while and can't do this in a satisfactory way. It's not really as simple as your code because your code doesn't account for nested chains, which need to have the escaping propagated in some way, but no matter what I try it either ends up as a really hacky solution (even worse than the adv_func stuff already is) or there's some problem.
You're welcome to try solving the problem yourself but I don't feel like this is important enough, given that you can escape stuff using quotes.
Title says it all. It's uses should be obvious too, though I'm surprised this wasn't already considered when creating command chain functionality.
As to why it's needed, if anyone needs to know: Something like
!command "Hello, I'm some \"args with quotes\""
would, with the current code, be given["Hello, I'm some \\args", "with", "quotes\\"]
(or something to that effect, I haven't tested it enough to see where and how many\
there are) as its array of parameters, instead of["Hello, I'm some \"args with quotes\""]
as you would expect.If need be, I've hacked together a small bit of code for the beginning of this block that replicates this escaping functionality, though I doubt it fits the coding style of the rest of the code:
The text was updated successfully, but these errors were encountered: