diff --git a/book/modules/using_modules.md b/book/modules/using_modules.md index 849e001e7c..ba458d2888 100644 --- a/book/modules/using_modules.md +++ b/book/modules/using_modules.md @@ -75,19 +75,33 @@ The path to the module can be: This allows you to install modules to a location that is easily accessible via a relative path regardless of the current directory. ::: -- An absolute or relative path to a Nushell module file. As above, Nushell will search the `$env.NU_LIB_DIRS` for a matching relative path. +- An absolute path to a Nushell module file: ::: details Example ```nu use ~/nushell/modules/std-rfc/bulk-rename.nu - # Or + ``` + + ::: + +- A relative path to a Nushell module file: + + ::: details Example + + ```nu cd ~/nushell/modules use std-rfc/bulk-rename.nu ``` ::: + ::: important Important! Importing modules from `$env.NU_LIB_DIRS` + When importing a module via a relative path, Nushell first searches from the current directory. If a matching module is not found at that location, Nushell then searches each directory in the `$env.NU_LIB_DIRS` list. + + This allows you to install modules to a location that is easily accessible via a relative path regardless of the current directory. + ::: + - A virtual directory: ::: details Example