export for core

Export definitions or environment variables from a module.

Signature

> export {flags}

Input/output types:

inputoutput
nothingnothing

Examples

Export a definition from a module

> module utils { export def my-command [] { "hello" } }; use utils my-command; my-command
hello

Notes

This command is a parser keyword. For details, check: https://www.nushell.sh/book/thinking_in_nu.html

Subcommands:

nametypeusage
export aliasBuiltinAlias a command (with optional flags) to a new name and export it from a module.
export constBuiltinUse parse-time constant from a module and export them from this module.
export defBuiltinDefine a custom command and export it from a module.
export externBuiltinDefine an extern and export it from a module.
export moduleBuiltinExport a custom module from a module.
export useBuiltinUse definitions from a module and export them from this module.