Add a function to call `just` executable that preserves all CLI-passed parameters
I often have to run just_executable() while also passing all of the parameters passed by the user. As you can see in this example, forwarding parameters to sub-task is highly error-prone and cumbersome. Instead, I think it would be better to have a just_forward() function that automatically handles this param-escaping logic:
param1 := "default for param1"
param2 := "default for param2"
nested_just := just_executable() + " param1=" + quote(param1) + " param2=" + quote(param2)
foo:
# ...
{{ nested_just }} bar ...
# ...
bar:
# ...
This is definitely desirable, but I don't know how to make it work well enough to be comfortable landing it. For example, if you want to override some flags, then those new flags would conflict fi if they were already given on the command line.
off the top of my head, weird syntax style:
just_forward() = keep context
just_forward(foo, bar) = only forward variables foo and bar
just_forward_without(foo) = keep context except for param "foo"
goes into the same thing as: #1772
@gabyx thx, good link. The only difference here is that forwarding not only escapes a series of arguments, but also properly handles variable assignments -- just var1=bar var2=1 target1 arg1 arg2