]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
lualoader: Support variable substitution in env var settings
authorKyle Evans <kevans@FreeBSD.org>
Sun, 10 Jun 2018 02:36:38 +0000 (02:36 +0000)
committerKyle Evans <kevans@FreeBSD.org>
Sun, 10 Jun 2018 02:36:38 +0000 (02:36 +0000)
commitdeb8c8f55c1d8a28966cf79d379720cf7131cdbe
tree3f3629e25a58aa50985d9ba1e946fbbdb4603473
parent6387091e9ad676a28206aed59ee953e27876aa51
lualoader: Support variable substitution in env var settings

We support both of the following cases of substitution:

bar="y"
foo="${bar}"
foo="$bar"

The latter substitution syntax is, of course, not recommended- all
punctuation must be considered potential variable names, and we do not go
through the effort of searching the different combinations of, for instance,
"$x.y.z" to determine if the variable is $x, $x.y, or $x.y.z.

This is not officially documented as supported, but it has worked in
forthloader for what is most likely a long time as `evaluate` is used to
process the right hand side of the assignment.
stand/lua/config.lua