Given a complex project with each sub-directory has its own commands, e.g. mlt, where each subdir is an implementation in a different language, I need to have a consistent way to run all commands with a prefix, e.g. just rust::build and just java::test, but when I am in a specific language directory like /rust, i may want to skip the prefix, and just build (which would do the same as just rust::build.
Is there any reasonable path towards this?
Some ideas, all of which are a bit uncertain in terms of consistency and working directories
- introduce a tiny justfile in each subdir that imports the submodule
- introduce some magical "catch all" just command that will get called if no command is found, which can check the current dir, compute the prefix, and run another just command with a prefix (must check that bad command had no prefix already to avoid infinite recursion)
Given a complex project with each sub-directory has its own commands, e.g. mlt, where each subdir is an implementation in a different language, I need to have a consistent way to run all commands with a prefix, e.g.
just rust::buildandjust java::test, but when I am in a specific language directory like/rust, i may want to skip the prefix, andjust build(which would do the same asjust rust::build.Is there any reasonable path towards this?
Some ideas, all of which are a bit uncertain in terms of consistency and working directories