Proposal: `rustup env <shell>` to source the `env.*` file automatically for a certain shell
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 7k
- Forks
- 1.1k
- Avg merge
- 22h 40m
- Merged PRs (30d)
- 46
Description
Problem you are trying to solve
... say, I suddenly decided to start using
nubut that happens after my lastrustup self update. In this case I'll definitely end up without anyenv.nuand 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):https://github.com/rust-lang/rustup/blob/178c502bfab89b68d7e2f2fa681e07ccef295656/src/cli/self_update/env.nu#L1-L3
https://github.com/rust-lang/rustup/issues/3639#issuecomment-2542661654
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*shrcfile.
OTOH, if they want to source theenv.*file automatically,rustup env <shell>would be perfect in terms of adding these sourcing scripts on demand.
https://github.com/rust-lang/rustup/issues/3639#issuecomment-2545551436
Notes
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing src/cli/self_update/env.nu and the linked discussion about generating shell-specific environment files. Define the behavior and supported-shell scope for rustup env , including what automatic sourcing should mean; done requires an agreed design and corresponding command behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100