Skip to content

Commit 99cf118

Browse files
authored
Document config as environment variable (#437)
1 parent f0cc862 commit 99cf118

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

book/configuration.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,20 @@ _(You can think of the Nushell config loading sequence as executing two [REPL](h
1313
When you launch Nushell without these files set up, Nushell will prompt you to download the [`default env.nu`](https://github.com/nushell/nushell/blob/main/docs/sample_config/default_env.nu) and [`default config.nu`](https://github.com/nushell/nushell/blob/main/docs/sample_config/default_config.nu).
1414
You can browse the default files for default values of environment variables and a list of all configurable settings.
1515

16-
### Configuring `$config`
16+
### Configuring `$env.config`
1717

18-
Nushell's main settings are kept in the global `$config` variable as a record. This record can be created using:
18+
Nushell's main settings are kept in the `config` environment variable as a record. This record can be created using:
1919

2020
```
21-
let $config = {
21+
let-env $config = {
2222
...
2323
}
2424
```
2525

26-
You can also shadow `$config` and update it:
26+
You can also shadow `$env.config` and update it:
2727

2828
```
29-
let $config = ($config | upsert <field name> <field value>)
29+
let-env $config = ($env.config | upsert <field name> <field value>)
3030
```
3131

3232
By convention, this variable is defined in the `config.nu` file.
@@ -39,6 +39,8 @@ You can set environment variables for the duration of a Nushell session using [`
3939
let-env FOO = 'BAR'
4040
```
4141

42+
_(Although $env.config is an environment varialbe, it is still defined by convention inside config.nu.)_
43+
4244
These are some important variables to look at for Nushell-specific settings:
4345

4446
- `LS_COLORS`: Sets up colors per file type in ls

0 commit comments

Comments
 (0)