05-12-2012, 02:16 AM
In your recent update: sets are strings of console tokens, not lists of numbers. Console tokens are arguments of console commands, i.e. with quoted strings counted as a single token. I guess this works:
rpn "/\"two words\" one \"foo bar\"" "/one two three \"foo bar\"" int
According to the source though, I think this would return the string "one foo bar" instead of "one \"foo bar\"". I can't test this now.
Also, in your bx_if_eq, ${1} isn't prefixed with a slash to make sure its contents are not considered a cvar. Isn't that needed? Same with your example of "intersection".
Lastly, I "explained" prio lists in this post. I'm not sure it belongs in console tricks, they are just a few undocumented cvars.
rpn "/\"two words\" one \"foo bar\"" "/one two three \"foo bar\"" int
According to the source though, I think this would return the string "one foo bar" instead of "one \"foo bar\"". I can't test this now.
Also, in your bx_if_eq, ${1} isn't prefixed with a slash to make sure its contents are not considered a cvar. Isn't that needed? Same with your example of "intersection".
Lastly, I "explained" prio lists in this post. I'm not sure it belongs in console tricks, they are just a few undocumented cvars.