justl.el icon indicating copy to clipboard operation
justl.el copied to clipboard

Support optional arguments for justl-exec-recipe-in-dir

Open glucas opened this issue 1 year ago • 2 comments

When executing recipes from the justl buffer you have the option to "execute" or "execute with arguments". It would be great if there were a way to provide additional arguments when using justl-exec-recipe-in-dir. This could be an alternate command (like justl-exec-recipe-in-dir-with-args), but I was thinking you could handle an optional prefix argument.

That way one could bind justl-exec-recipe-in-dir to e.g. C-c j and then use C-u C-c j when additional arguments are needed.

glucas avatar Sep 10 '23 17:09 glucas

This seems similar to #30, which is closed but does not seem to work for me. I'm testing with a simple recipe like

test target:
    echo '{{target}}'

and I don't get prompted for target.

Initially I was thinking that #30 worked for required parameters but did not handle optional ones with a default value -- but neither is working for me.

glucas avatar Sep 10 '23 18:09 glucas

I can reproduce the issue too with justl-exec-recipe-in-dir. I am open to receiving pull requests, although I am uncertain if I will have sufficient bandwidth to personally resolve it in near future.

psibi avatar Sep 13 '23 02:09 psibi

Fixed via https://github.com/psibi/justl.el/pull/62

psibi avatar Nov 15 '24 06:11 psibi