Open maxim-uvarov opened 2 weeks ago
This is the code. So, it looks like it's failing to find the env var and falling back to the default. I'm guessing that this means you don't have XDG_CONFIG_HOME set before launching nushell? https://github.com/nushell/nushell/blob/da98c23ab3639ab78cadf2fe71ffbca42048b168/crates/nu-path/src/helpers.rs#L8-L14
@fdncred Nope, I have the $XDG_CONFIG_HOME set before the launch. I checked the situation on two machines.
On my main machine in wezterm.lua
, I have this:
config.default_prog = { '/Users/user/.cargo/bin/nu', '-l'}
config.set_environment_variables = {
XDG_CONFIG_HOME = '/Users/user/.config'
}
For example, the history path works as expected:
> $nu.history-path
/Users/user/.config/nushell/history.sqlite3
@fdncred I found it.
I also need to set $env.XDG_DATA_HOME
, not just $env.XDG_CONFIG_HOME
.
However, it's not documented or intuitive. Maybe nushell can check if $env.XDG_DATA_HOME
is not set, then check the $env.XDG_CONFIG_HOME
variable on Mac, and only then fall back to the default?
oh ya, that's what the code says. LOL
Describe the bug
I have $env.XDG_CONFIG_HOME set and it is used for configs, yet nushell doesn't recognize it
How to reproduce
Expected behavior
I expect this variable to point to the right dir
Screenshots
No response
Configuration
Additional context
No response