Skip to content

Commit 78301d6

Browse files
authored
Update scripts.md (#1738)
missing word - be
1 parent 5f49010 commit 78301d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

book/scripts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ nu myscript.nu run
131131
# => running
132132
```
133133

134-
[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.
134+
[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.
135135

136136
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:
137137

0 commit comments

Comments
 (0)