that allows FNM to run un nushell
$env.PATH = ($env.PATH | split row (char esep) | append "/opt/homebrew/bin")
$env.PATH = ($env.PATH | split row (char esep) | append "~/.bun/bin")
load-env (fnm env --shell bash
| lines
| str replace 'export ' ''
| str replace -a '"' ''
| split column =
| rename name value
| where name != "FNM_ARCH" and name != "PATH"
| reduce -f {} {|it, acc| $acc | upsert $it.name $it.value }
)
$env.PATH = ($env.PATH
| split row (char esep)
| prepend $"($env.FNM_MULTISHELL_PATH)/bin"
)
This two lines allowed me to add homebrew bins and bun bins to the “$PATH”
$env.PATH = ($env.PATH | split row (char esep) | append "/opt/homebrew/bin")
$env.PATH = ($env.PATH | split row (char esep) | append "~/.bun/bin")
this is how you can create your own environment variables in nushell
$env.BEX_PATH = "~/Projects/BEX"