You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yes, exactly. Let's not load the same type of config twice. For clarity, when running nu -c:
--env-config=env.nu
--config=config.nu
loads
yes
yes
env.nu and config.nu
yes
no
env.nu and nothing
no
yes
default_env.nu and config.nu
no
no
default_env.nu and nothing
The question is should we load default_config.nu if no --config flag is passed but I think it's not necessary since most things defined there (completions, menus, keygbindings, table rendering, ...) do not impact the runtime.
When running the interactive mode, it should never try to load the default env/config. Instead, it would try to read the user config location and if it does not exist, prompt the user to download the default config as it does now.
--env-config=env.nu
--config=config.nu
loads
yes
yes
env.nu and config.nu
yes
no
env.nu and ~/.config/nushell/config.nu
no
yes
~/.config/nushell/env.nu and config.nu
no
no
~/.config/nushell/env.nu and ~/.config/nushell/config.nu
At most, two configs should be read in the correct order: env config, then the normal config. I feel like in #5986 something is weird that maybe there are more config files being read and/or not read in the right order. Maybe the cause of the issue is the same as this one.
nice documentation in the tables here. How does any of this impact login.nu? It would be nice to clarify if that is being read/loaded every time, no matter what, if nushell is the login shell.
Ah, I forgot about login.nu. I guess that one should only be loaded when Nushell runs in a login mode which I think is activated with the nu -l flag. Not sure about the ordering of login.nu. Whatever makes sense -- I guess we can just keep the one that we have now.
Activity
WindSoilder commentedon Jul 8, 2022
I'm sorry for introducing a bug like this :-(
Do you mean we should do something like this?
kubouch commentedon Jul 8, 2022
Don't worry, that happens.
Yes, exactly. Let's not load the same type of config twice. For clarity, when running
nu -c:--env-config=env.nu--config=config.nuenv.nuandconfig.nuenv.nuand nothingdefault_env.nuandconfig.nudefault_env.nuand nothingThe question is should we load
default_config.nuif no--configflag is passed but I think it's not necessary since most things defined there (completions, menus, keygbindings, table rendering, ...) do not impact the runtime.When running the interactive mode, it should never try to load the default env/config. Instead, it would try to read the user config location and if it does not exist, prompt the user to download the default config as it does now.
--env-config=env.nu--config=config.nuenv.nuandconfig.nuenv.nuand~/.config/nushell/config.nu~/.config/nushell/env.nuandconfig.nu~/.config/nushell/env.nuand~/.config/nushell/config.nuAt most, two configs should be read in the correct order: env config, then the normal config. I feel like in #5986 something is weird that maybe there are more config files being read and/or not read in the right order. Maybe the cause of the issue is the same as this one.
fdncred commentedon Jul 8, 2022
nice documentation in the tables here. How does any of this impact
login.nu? It would be nice to clarify if that is being read/loaded every time, no matter what, if nushell is the login shell.kubouch commentedon Jul 8, 2022
Ah, I forgot about
login.nu. I guess that one should only be loaded when Nushell runs in a login mode which I think is activated with thenu -lflag. Not sure about the ordering oflogin.nu. Whatever makes sense -- I guess we can just keep the one that we have now.kubouch commentedon Jul 14, 2022
Closed by #6040