On this page
export
for core
Export definitions or environment variables from a module.
Signature
> export {flags}
Input/output types:
input | output |
---|---|
nothing | nothing |
Examples
Export a definition from a module
>moduleutils { export defmy-command [] { "hello" } };useutilsmy-command;my-command
hello
Notes
This command is a parser keyword. For details, check: https://www.nushell.sh/book/thinking_in_nu.html
Subcommands:
name | type | usage |
---|---|---|
export alias |
Builtin | Alias a command (with optional flags) to a new name and export it from a module. |
export const |
Builtin | Use parse-time constant from a module and export them from this module. |
export def |
Builtin | Define a custom command and export it from a module. |
export def-env |
Builtin | Define a custom command that participates in the environment and export it from a module. |
export extern |
Builtin | Define an extern and export it from a module. |
export extern-wrapped |
Builtin | Define an extern with a custom code block and export it from a module. |
export module |
Builtin | Export a custom module from a module. |
export use |
Builtin | Use definitions from a module and export them from this module. |
Copyright © 2019–2023 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/export.html