4 ms·
I had something like this implemented for safely executing shell commands, by using metaprogramming: name="A$ron" z("echo Hello {name}") Note that this is no
by feraidoon 2y ago
I had something like this implemented for safely executing shell commands, by using metaprogramming:
name="A$ron"
z("echo Hello {name}")
Note that this is not an f-string. The z function expands the variables by parsing this string and accessing its caller's local variables.
https://github.com/NightMachinery/brish https://github.com/NightMachinery/brish