Skip to content

Commit 4f6d1f4

Browse files
committed
Small tweaks while writing PR notes
1 parent ac759fb commit 4f6d1f4

File tree

3 files changed

+7
-13
lines changed

3 files changed

+7
-13
lines changed

book/modules.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Like many programming languages, Nushell supports writing and using _modules_ as
55
- Additional custom commands
66
- Aliases
77
- Constants
8+
- Externs
89
- Environment variables
910
- And even other modules (a.k.a., submodules)
1011

book/modules/creating_modules.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ use inc.nu *
4040
# => 6
4141
```
4242

43-
Of course, you can easily distribute this file so that others can make use of the module as well.
43+
Of course, you can easily distribute a file like this so that others can make use of the module as well.
4444

4545
## Exports
4646

47-
We covered the types of definitions that are available in modules briefly in [Using Modules](./using_modules.md) from the end-user's perspective. Module authors, on the other hand, need to know _how_ to create the export definitions for:
47+
We covered the types of definitions that are available in modules briefly in the main Modules Overview above. While this might be enough explanation for an end-user, module authors will need to know _how_ to create the export definitions for:
4848

4949
- Commands ([`export def`](/commands/docs/export_def.md))
5050
- Aliases ([`export alias`](/commands/docs/export_alias.md))
@@ -55,7 +55,7 @@ We covered the types of definitions that are available in modules briefly in [Us
5555
- Environment setup ([`export-env`](/commands/docs/export-env.md))
5656

5757
::: tip
58-
Only definitions marked with `export` (or `export-env` for environment variables) are accessible when the module is imported. Definitions not marked with `export` are only visible from inside the module. In some languages, these would be called "private" definitions. An example can be found below in [Additional Examples](#local-definitions).
58+
Only definitions marked with `export` (or `export-env` for environment variables) are accessible when the module is imported. Definitions not marked with `export` are only visible from inside the module. In some languages, these would be called "private" or "local" definitions. An example can be found below in [Additional Examples](#local-definitions).
5959
:::
6060

6161
### `main` Exports
@@ -64,7 +64,7 @@ Only definitions marked with `export` (or `export-env` for environment variables
6464
An export cannot have the same name as that of the module itself.
6565
:::
6666

67-
In the [Basic Example](#basic-module-example) above, we had a module named `inc` with a command named `increment`. However, if you try to renamed that file to `increment.nu`, it will fail to import.
67+
In the [Basic Example](#basic-module-example) above, we had a module named `inc` with a command named `increment`. However, if we rename that file to `increment.nu`, it will fail to import.
6868

6969
```nu
7070
mv inc.nu increment.nu
@@ -85,7 +85,7 @@ export def main []: int -> int {
8585
}
8686
```
8787

88-
Then:
88+
Now it works as expected:
8989

9090
```nu
9191
use ./increment.nu

book/modules/using_modules.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,7 @@
44

55
## Overview
66

7-
End-users can add new functionality to Nushell by using ("importing") modules written by others. Modules can include:
8-
9-
- Commands
10-
- Aliases
11-
- Constants
12-
- Externs
13-
- Other modules (as submodules)
14-
- Environment variables
7+
End-users can add new functionality to Nushell by using ("importing") modules written by others.
158

169
To import a module and its definitions, we call the [`use`](/commands/docs/use.md) command:
1710

0 commit comments

Comments
 (0)