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.
> module utils { export def my-command [] { "hello" } }; use utils my-command; my-command
helloNotes
This command is a parser keyword. For details, check: https://www.nushell.sh/book/thinking_in_nu.html
Subcommands:
| name | description | type |
|---|---|---|
export alias |
Alias a command (with optional flags) to a new name and export it from a module. | keyword |
export const |
Use parse-time constant from a module and export them from this module. | keyword |
export def |
Define a custom command and export it from a module. | keyword |
export extern |
Define an extern and export it from a module. | keyword |
export module |
Export a custom module from a module. | keyword |
export use |
Use definitions from a module and export them from this module. | keyword |
Copyright © 2019–2026 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/export.html