Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: subcommands by chaining justfiles #1317

Closed
indigoviolet opened this issue Aug 24, 2022 · 1 comment
Closed

Suggestion: subcommands by chaining justfiles #1317

indigoviolet opened this issue Aug 24, 2022 · 1 comment

Comments

@indigoviolet
Copy link

indigoviolet commented Aug 24, 2022

Have you considered more explicit support for sub-commands? Specifically: having a recipe that could "chain" into a different justfile. So if I have

#.justfile
sub = subcommand("/path/to/sub.justfile")
#sub.justfile
foo_recipe:
    ....

I could execute just sub foo_recipe.

This supports modularization in some ways, and it could help organize multiple justfiles in a neat way.

It's pretty easy to simulate today:

sub subcmd *args:
     just -f /path/to/sub.justfile {{ subcmd }} {{ args }}

But you could imagine adding niceties on top: shell completion & help for the subcommand recipes, passing down variables etc.

@casey
Copy link
Owner

casey commented Aug 24, 2022

Definitely! I want to do this via a module system, see #383 and #929.

@casey casey closed this as completed Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants