Skip to content

Refactor the default configuration #7371

@sophiajt

Description

@sophiajt

Related problem

Right now we use two configuration files: env.nu for environment and config.nu for configuration.

While this is helpful, it's easy to break between versions. It's also a bit tricky to contribute new completions to the default.

Describe the solution you'd like

One recommendation would be that the default files aren't intended to be edited, but they point to files that are. That way, defaults can be handled by Nushell and we won't overwrite the user's custom settings.

This could be done by the config.nu (or env.nu) importing settings from other files. Say path.nuon which has a list of paths in it that will form the user's PATH/Path.

We could also move completions into their own directory that's a subdirectory of the main nushell configuration directory. Each of these files could be imported by the default configuration. As they don't have an ordering, we could (once we had a mechanism in the language to do it) just let users drop new files into this directory and also pre-populate it from a core set of completions (including things like git completions).

Describe alternatives you've considered

No response

Additional context and details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions