Skip to content

Proposal: rustup env <shell> to source the env.* file automatically for a certain shell #4128

Open

Description

@rami3l

Problem you are trying to solve

... say, I suddenly decided to start using nu but that happens after my last rustup self update. In this case I'll definitely end up without any env.nu and have to manually populate that file from the repo (we shouldn't assume that I can find that file that easily in the first place):

if ("{cargo_bin}" not-in ($env.Path | split row (char esep))) {
$env.Path = ($env.Path | prepend "{cargo_bin}")
}

#3639 (comment)

Solution you'd like

... if the user wants to add another shell to the mix, manually sourcing the corresponding env.* file will do, and it's usually just a single line in their *shrc file.
OTOH, if they want to source the env.* file automatically, rustup env <shell> would be perfect in terms of adding these sourcing scripts on demand.
#3639 (comment)

Notes

No response

Activity

  1. added this to the 1.29.0 milestone on Dec 24, 2024
  2. changed the title [-]Proposal: `rustup env <shell>`[/-] [+]Proposal: `rustup env <shell>` to source the `env.*` file automatically for a certain shell[/+] on Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions