49
edits
| Line 158: | Line 158: | ||
==== Special delimiters ==== | ==== Special delimiters ==== | ||
:1. Back ticks surrounding text passed directly to a context will be stripped, such that the resulting text will get treated as a script block to be run in the context. Normally all text is passed verbatim, including quotes. This is useful for multi-line scripts, as normally all text on the same line will be passed without quotes anyway. | :1. Back ticks surrounding text passed directly to a context will be stripped, such that the resulting text will get treated as a script block to be run in the context. Normally all text is passed verbatim, including quotes. This is useful for multi-line scripts, as normally all text on the same line will be passed without quotes anyway. | ||
<kua> | <kua> | ||
> lua `print "bob"` | > lua `print "bob"` | ||
| Line 210: | Line 198: | ||
</kua> | </kua> | ||
: This time commands are run in the unintended context. | : This time commands are run in the unintended context. | ||
<kua> | |||
> lua run 'print "bob"' | |||
bob | |||
</kua> | |||
: Above calls the 'lua' context 'run' command, and as normal 'print "bob"' is a complete parameter for 'run', that then gets executed in the Lua runtime all together. | |||
<kua> | |||
> lua print "bob" | |||
bob | |||
> lua 'print "bob"' | |||
Error in : [string "'print "bob"'"]:1: unexpected symbol near ''print "bob"'' (3) | |||
</kua> | |||
: Passed directly to the 'lua' context verbatim and treated necessarily as a command to be run. This fails as 'print is not a valid 'lua' context command, and 'print "bob"' is not valid Lua. | |||
== Notes == | == Notes == | ||
* | * | ||