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