Skip to content

Config command ideas. #634

Closed
Closed

Description

@andrasio

config coverage was quite something and brought some usage questions. To aid in test harness a --load flag was introduced.

At the moment, when running, say > config --load some_file.toml --set [feature arepa] Nu will load in memory and use that configuration file and write there instead of the default config.toml for that specific pipeline call.

This means that whenever --load is used Nu will read and write to that configuration file instead and further calls to config without passing the load flag will still use the default config.toml for reading/writing configuration data.

Perhaps introducing a --merge flag could be used as well. In other shells, users share their dotfiles. Maybe if users share their configuration files we could do something like > config --load other_user_conf.toml --merge and Nu could merge the information with the default one.

Activity

  1. wycats commented on Sep 10, 2019

    @wycats
    Contributor

    @androbtech I think the approach we use in Cargo, which is to allow a hierarchy of configuration through the directory hierarchy, is a good idea.

    We could still fall back to the location in the dirs crate, but search the directory hierarchy first.

    We should also consider the "shared dotfiles" question directly. It's a very common workflow and it would be great to build something in (imagine if you could point your config at a github repo or gist and nu would just get it for you).

  2. added
    category:enhancement
    status:needs-design
    on Sep 10, 2019
  3. andrasio commented on Nov 3, 2019

    @andrasio
    MemberAuthor
  4. github-actions commented on Jun 24, 2021

    @github-actions

    This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

  5. github-actions commented on Jul 7, 2021

    @github-actions

    This issue has been marked stale for more than 10 days without activity. Closing this issue, but if you find that the issue is still valid, please reopen.

  6. added a commit that references this issue on Feb 7, 2022
  7. added a commit that references this issue on Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    category:enhancementstatus:needs-design

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions