nushell/old_nushell/docs/commands/load-env.md
Fernando Herrera fdce6c49ab engine-q merge
2022-02-07 19:11:34 +00:00

765 B

load-env

Set environment variables using a table stream

Usage

> load-env (environ) {flags} 

Parameters

  • (environ) Optional environment table to load in. If not provided, will use the table provided on the input stream

Flags

  • -h, --help: Display this help message

Examples

Load variables from an input stream

> echo [[name, value]; ["NAME", "JT"] ["AGE", "UNKNOWN"]] | load-env; echo $nu.env.NAME

Load variables from an argument

> load-env [[name, value]; ["NAME", "JT"] ["AGE", "UNKNOWN"]]; echo $nu.env.NAME

Load variables from an argument and an input stream

> echo [[name, value]; ["NAME", "JT"]] | load-env [[name, value]; ["VALUE", "FOO"]]; echo $nu.env.NAME $nu.env.VALUE