Spec-Zone.ru › Nushell

export const for core

Use parse-time constant from a module and export them from this module.

Signature

> export const {flags} (const_name) (initial_value)

Parameters

  • const_name: The constant name to create and export.
  • initial_value: Equals sign followed by constant value.

Input/output types:

input output
nothing nothing

Examples

Re-export a constant from another module.

> module spam { export const foo = 3; }
    module eggs { export use spam foo }
    use eggs foo
    foo

3

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_const.html

Spec-Zone.ru

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