Skip to content

Commit

Permalink
Add 'Reading environment variables' section (#469)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgollenz committed May 31, 2022
1 parent 1a64d3f commit c65b161
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions book/environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,15 @@ See [Defining environment from custom commands](environment.md#defining-environm

See [Modules](modules.md) for details.

## Reading environment varibles

Individual environment variables are fields of a record that is stored in the `$env` variable and can be read with `$env.VARIABLE`:

```
> $env.FOO
BAR
```

## Scoping

When you set an environment variable, it will be available only in the current scope (the block you're in and any block inside of it).
Expand Down

0 comments on commit c65b161

Please sign in to comment.