nushell/docs/commands/export_env.md
Justin Ma c0a1d18e3d
update #4455, regenerate commands' docs and update make_docs script (#4586)
* feat: update #4455, regenerate commands' docs

* chore: update make_docs script
2022-02-21 11:26:00 -06:00

479 B

title layout version
export env command 0.59.0

Export a block from a module that will be evaluated as an environment variable when imported.

Signature

> export env (name) (block)

Parameters

  • name: name of the environment variable
  • block: body of the environment variable definition

Examples

Import and evaluate environment variable from a module

> module foo { export env FOO_ENV { "BAZ" } }; use foo FOO_ENV; $env.FOO_ENV