
2 Nov
2021
2 Nov
'21
5:44 p.m.
On Tue, Nov 02, 2021 at 03:19:14PM +0800, Artem Lapkin wrote:
Add possibility setup env variable with additional resolving vars inside value.
Usage examples
=> setenv a hello => setenv b world => setenv c '${a} ${b}' => setenv -r d '${c}! ${a}...' => printenv d d=hello world! hello...
/* internal usage example */ env_resolve("d", "${c}! ${a}..."); /* d="hello world! hello..." */
Notes
Resolving works only for ${var} "bracket" and didn't workd for "unbracket" $var
=> setenv -r d '$c! $a...' => printenv d d=$c! $a...
Signed-off-by: Artem Lapkin art@khadas.com
The high level problem I have with this patch is that we keep going back to "we really need to update to a modern hush (or other shell) rather than patching new features in to our ancient fork".
--
Tom