Spec-Zone.ru › Nushell

export module for core

Export a custom module from a module.

Signature

> export module {flags} (module) (block)

Parameters

  • module: Module name or module path.
  • block: Body of the module if 'module' parameter is not a path.

Input/output types:

input output
nothing nothing

Examples

Define a custom command in a submodule of a module and call it.

> module spam {
        export module eggs {
            export def foo [] { "foo" }
        }
    }
    use spam eggs
    eggs foo
foo

Notes

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

Copyright © 2019–2026 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/export_module.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API