"just --list" should list fallback recipes
Now that fallback is stable, it seems that just --list should be aware and display fallback recipes, perhaps under a "fallback" section.
Maybe just could show the fallback recipes it finds in “upper” justfiles as follows:
Available fallback recipes (../../justfile) task1 task2
Available fallback recipes (../../../../justfile) task3 task4
or perhaps the paths should be absolute?
Would be great also in my use case. I have one main ~/projects/justfile containing some reusable recipes that are similar to most of my projects, like apply, plan etc. I have some projects that need additional recipes. For example in ~/projects/project-a/justfile contains build, deploy recipes and fallback param so I can call just apply for this project too. Sadly just --list does not show parent recipes so anybody that wants to know what recipes are available will get incomplete list.
NOTE: we'll probably also need to:
- update
just --summary🤔 - update shell completers to list fallback recipes (and categorize them as such for shells that support this, like zsh)
Maybe just could show the fallback recipes it finds in “upper” justfiles as follows:
Available fallback recipes (../../justfile) task1 task2 Available fallback recipes (../../../../justfile) task3 task4
or perhaps the paths should be absolute?
Perhaps a third option of the paths being relative to the root justfile (the one without fallback)
I'm thinking of examples like mono-repos where you might have a justfile in the root of the repo without fallback, and various sub-repo specific justfiles with fallback
Similarly, I think it could make sense for just --show recipe_from_parent_dir to succeed if recipe_from_parent_dir can be found via fallback.
Currently the above gives the following:
error: Justfile does not contain recipe `recipe_from_parent_dir`.