Skip to content

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

@nyurik

Description

@nyurik

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions