2022-02-14 02:22:51 +00:00
|
|
|
---
|
|
|
|
title: let-env
|
|
|
|
layout: command
|
2022-03-04 12:10:09 +00:00
|
|
|
version: 0.59.1
|
2022-02-14 02:22:51 +00:00
|
|
|
---
|
|
|
|
|
2021-05-30 00:57:04 +00:00
|
|
|
Create an environment variable and give it a value.
|
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
## Signature
|
|
|
|
|
|
|
|
```> let-env (var_name) (initial_value)```
|
2021-05-30 00:57:04 +00:00
|
|
|
|
|
|
|
## Parameters
|
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
- `var_name`: variable name
|
|
|
|
- `initial_value`: equals sign followed by value
|
2021-05-30 00:57:04 +00:00
|
|
|
|
2022-02-20 01:13:33 +00:00
|
|
|
## Examples
|
|
|
|
|
|
|
|
Create an environment variable and display it
|
|
|
|
```shell
|
|
|
|
> let-env MY_ENV_VAR = 1; $env.MY_ENV_VAR
|
|
|
|
```
|