Skip to content

Commit 81fd0de

Browse files
authored
Explain that $env is case-insensitive (#1376)
1 parent 0ff1336 commit 81fd0de

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

book/environment.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,12 @@ BAR
112112
BAR
113113
```
114114

115+
### Case sensitivity
116+
117+
Nushell's `$env` is case-insensitive, regardless of the OS. Although `$env` behaves mostly like a record, it is special in that it ignores the case when reading or updating. This means, for example, you can use any of `$env.PATH`, `$env.Path`, or `$env.path`, and they all work the same on any OS.
118+
119+
If you want to read `$env` in a case-sensitive manner, use `$env | get --sensitive`.
120+
115121
## Scoping
116122

117123
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).

0 commit comments

Comments
 (0)