fnm -> this -> load-env = use fnm in nushell
This is just a quick, simple, non-hacky-script solution for Schniz/fnm#463
Install:
go install github.com/Southclaws/fnm-nushell@latest
Load into shell:
fnm env --shell power-shell | fnm-nushell | from json | load-env
Breakdown:
- we use powershell because it's the easiest to parse without surprises
fnm env --shell power-shell
- fnm-nushell just turns this into JSON
fnm env --shell power-shell | fnm-nushell
- turn that json into a nushell table
fnm env --shell power-shell | fnm-nushell | from json
- load that data table as env vars
fnm env --shell power-shell | fnm-nushell | from json | load-env