From 50b9e3462146745079ca4c680d733fb5a697019d Mon Sep 17 00:00:00 2001 From: Andrew Bradley Date: Thu, 20 Nov 2025 13:01:35 -0500 Subject: [PATCH] add module_file() and module_directory() to readme --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 72c8c2898a..fc182e5203 100644 --- a/README.md +++ b/README.md @@ -1823,6 +1823,18 @@ script: directory, respectively, of the current `import` or `mod` source file when called from within an import or submodule. +#### Module and Module Directory + +- `module_file()` - Retrieves the path of the current module file. + +- `module_directory()` - Retrieves the path of the parent directory of the + current module file. + +`module_file()` and `module_directory()` behave the same as `justfile()` and +`justfile_directory()` in the root `justfile`, but will return the path and +directory, respectively, of the current `mod` source file when +called from within submodule. + #### Just Executable - `just_executable()` - Absolute path to the `just` executable.