Skip to content

Update Config chapter for recent Nushell changes (e.g., user autoloads)#1868

Merged
NotTheDr01ds merged 1 commit into
nushell:mainfrom
NotTheDr01ds:config-updates
Apr 13, 2025
Merged

Update Config chapter for recent Nushell changes (e.g., user autoloads)#1868
NotTheDr01ds merged 1 commit into
nushell:mainfrom
NotTheDr01ds:config-updates

Conversation

@NotTheDr01ds
Copy link
Copy Markdown
Contributor

Updates the Configuration Chapter of the Book for recent updates, mainly user autoload directories.

@blindFS
Copy link
Copy Markdown
Contributor

blindFS commented Apr 8, 2025

I have a question about this feature: should those files in autoload dirs loaded with nu --config minimal_config.nu? Or is there any flag to disable them?

Actually I want to keep a minimal config file for the lsp server, that's the only reason keeps me from switching to this fancy setup.

@NotTheDr01ds
Copy link
Copy Markdown
Contributor Author

There's no flag today, but I do something similar with:

let temp_home = (mktemp -d)
$env.XDG_CONFIG_HOME = $temp_home
$env.XDG_DATA_HOME = $temp_home
nu --config minimal_config.nu
# Optionally
#rm -r $temp_home

There's a somewhat related Discord drawing-board where I discuss flags and autoloads, but more so forcing them to load when they wouldn't otherwise be.

If we wanted to disable them, I'd probably try to rewrite the --no-config (-n) option to allow --config-file and --env-file to override it. Today it's the opposite.

But I still think the entire startup needs some cleanup. That's mainly why I haven't gotten around to it yet.

@NotTheDr01ds NotTheDr01ds merged commit 14551fe into nushell:main Apr 13, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants