nushell/crates/nu-engine/src
YizhePKU 52d99cc60c
Change environment variables to be case-preserving (#12701)
This PR changes `$env` to be **case-preserving** instead of
case-sensitive. That is, it preserves the case of the environment
variable when it is first assigned, but subsequent retrieval and update
ignores the case.

Notably, both `$env.PATH` and `$env.Path` can now be used to read or set
the environment variable, but child processes will always see the
correct case based on the platform.

Fixes #11268.

---

This feature was surprising simple to implement, because most of the
infrastructure to support case-insensitive cell path access already
exists. The `get` command extracts data using a cell path in a
case-insensitive way (!), but accepts a `--sensitive` flag. (I think
this should be flipped around?)
2024-05-01 17:22:34 -05:00
..
call_ext.rs Rename IoStream to OutDest (#12433) 2024-04-09 16:48:32 +00:00
closure_eval.rs Refactor using ClosureEval types (#12541) 2024-04-22 14:15:09 +08:00
column.rs Use Record's public API in a bunch of places (#10927) 2023-11-08 14:24:00 +01:00
command_prelude.rs Add ErrSpan extension trait for Result (#12626) 2024-04-23 10:39:55 +02:00
documentation.rs Shrink the size of Expr (#12610) 2024-04-24 15:46:35 +00:00
env.rs Refactor using ClosureEval types (#12541) 2024-04-22 14:15:09 +08:00
eval_helpers.rs Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
eval.rs Change environment variables to be case-preserving (#12701) 2024-05-01 17:22:34 -05:00
glob_from.rs Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
lib.rs Refactor using ClosureEval types (#12541) 2024-04-22 14:15:09 +08:00
scope.rs Remove the Value::Block case (#12582) 2024-04-21 07:03:33 +02:00