Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update using_modules.md #1739

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions book/modules/using_modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ The path to the module can be:
use ~/nushell/modules/nupm
```

Note that the module name (its directory) can end in a `/` (or `\` on Windows), but as with most commands that take a paths (e.g., `cd`), this is completely optional.
Note that the module name (i.e., its directory) can end in a `/` (or `\` on Windows), but as with most commands that take paths (e.g., `cd`), this is completely optional.

:::

Expand Down Expand Up @@ -198,13 +198,13 @@ $PI

## Hiding

Any custom command or alias, imported from a module or not, can be "hidden", restoring the previous definition.
We do this with the [`hide`](/commands/docs/hide.md) command.
Any custom command or alias, whether imported from a module or not, can be "hidden" to restore the previous definition using
the [`hide`](/commands/docs/hide.md) command.

The `hide` command also accepts import patterns, just like [`use`](/commands/docs/use.md). The import pattern is interpreted slightly differently, though. It can be one of the following:
The `hide` command also accepts import patterns, similar to [`use`](/commands/docs/use.md), but interprets them slightly differently. These patterns can be one of the following:

- If the name is a custom command, it hides it directly. Otherwise ...
- If the name is a module name, hides all of its exports prefixed with the module name
- If the name is a custom command, the `hide` command hides it directly.
- If the name is a module name, it hides all of its exports prefixed with the module name

For example, using `std/assert`:

Expand Down
Loading