Repository navigation
Conversation
|
I think I finally cracked this nut. More of a root-canal than I expected but it seems to work. |
|
I think fixing #11154 is a much better idea, otherwise the project could end up maintaining not only two odd system behaviors, but also the interpolation of historical choices such as this as well. If #11154 is fixed, all users could use |
|
For consideration: #11432 |
|
This is not a windows-only change. It makes |
|
case-insensitive env in other systems still sounds strange to me 🤔 |
|
@amtoine I think it sounds strange to you because you only live in Linux.
This is true but it's basically saying, let's do everything the Linux way. It also means that you can't have |
yup, completely 😋 a related comment i think |
|
I don't like the idea of making only
What if instead of trying to make |
|
I'm also fine with the other PR like this one. Someone has to finish it though. |

Description
Nushell has never been able to handle
PATHon Windows orPathon *nix, because in those two use cases, they do not exist and it's actually reversed. Windows (most) always wants to see$env.Pathand MacOS and Linux want to see$env.PATH. This lead to a bunch of scripts checking the OS to determine if they should look atPATHorPath. This change allows you to$env.Path,$env.PATH,$env.path,$env.PaThon any OS, effectively making this access case-insensitive.I'm not sure this change is in the right place, but it works. I'm looking for reviewers to point out what's wrong with this or a better way to do it. It seems a little hack-ish to me.
I initially tried to hard code anything to
PATHbut that ended up breaking things an giving me twoPATHenv variables on Windows. It was very weird to have 2 of the same name env var. To top it off, they had slightly different data as well. So, I took the path of least resistance, which means Windows is always really stored asPathand MacOS/Linux is always stored asPATH.User-Facing Changes
Tests + Formatting
After Submitting