casey / casey/just

Allow un-prefixed just commands if running from same dir as submodule

Open
#3,096 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
35.8k
Forks
846
Avg merge
27m
Merged PRs (30d)
3

Description

Given a complex project with each sub-directory has its own commands, e.g. [mlt](https://github.com/maplibre/maplibre-tile-spec), 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)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.