Nushell
Get Nu!
Getting Started
  • The Nushell Book
  • Command Reference
  • Cookbook
  • Language Reference Guide
  • Contributing Guide
Blog
  • English
  • 中文
  • Deutsch
  • Français
  • Español
  • 日本語
  • Português do Brasil
  • Русский язык
GitHub
Get Nu!
Getting Started
  • The Nushell Book
  • Command Reference
  • Cookbook
  • Language Reference Guide
  • Contributing Guide
Blog
  • English
  • 中文
  • Deutsch
  • Français
  • Español
  • 日本語
  • Português do Brasil
  • Русский язык
GitHub
  • Categories

    • Bits
    • Bytes
    • Chart
    • Conversions
    • Core
    • Database
    • Dataframe
    • Dataframe Or Lazyframe
    • Date
    • Debug
    • Default
    • Env
    • Experimental
    • Expression
    • Filesystem
    • Filters
    • Formats
    • Generators
    • Hash
    • History
    • Lazyframe
    • Math
    • Misc
    • Network
    • Path
    • Platform
    • Plugin
    • Prompt
    • Random
    • Removed
    • Shells
    • Strings
    • System
    • Viewers

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:

namedescriptiontype
export aliasAlias a command (with optional flags) to a new name and export it from a module.keyword
export constUse parse-time constant from a module and export them from this module.keyword
export defDefine a custom command and export it from a module.keyword
export externDefine an extern and export it from a module.keyword
export moduleExport a custom module from a module.keyword
export useUse definitions from a module and export them from this module.keyword