From f397c6b44e131f8016c94d7deda15faa39fa7450 Mon Sep 17 00:00:00 2001 From: Jesper Olsen <43079279+jesper-olsen@users.noreply.github.com> Date: Mon, 6 Jan 2025 16:58:08 -0600 Subject: [PATCH] Update scripts.md missing word - be --- book/scripts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/scripts.md b/book/scripts.md index 28aed8626ef..dbd13c463dd 100644 --- a/book/scripts.md +++ b/book/scripts.md @@ -131,7 +131,7 @@ nu myscript.nu run # => running ``` -[Unlike modules](modules.html#main), `main` does _not_ need to exported in order to be visible. In the above example, our `main` command is not `export def`, however it was still executed when running `nu myscript.nu`. If we had used myscript as a module by running `use myscript.nu`, rather than running `myscript.nu` as a script, trying to execute the `myscript` command would not work since `myscript` is not exported. +[Unlike modules](modules.html#main), `main` does _not_ need to be exported in order to be visible. In the above example, our `main` command is not `export def`, however it was still executed when running `nu myscript.nu`. If we had used myscript as a module by running `use myscript.nu`, rather than running `myscript.nu` as a script, trying to execute the `myscript` command would not work since `myscript` is not exported. It is important to note that you must define a `main` command in order for subcommands of `main` to be correctly exposed. For example, if we had just defined the `run` and `build` subcommands, they wouldn't be accessible when running the script: