Generate completion files on toolchain switch or update
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
To utilize rustup completions, you are suggested to run rustup completions every time login shell is opened https://rust-lang.github.io/rustup/installation/index.html#enable-tab-completion-for-bash-fish-zsh-or-powershell. On some machines, this may drastically affect shell startup time
Solution you'd like
rustup completions can be called in a rustup internal post-install routine and generate proper completion files after updating or switching toolchain (or at first install); users will be able to source pre-baked completion files without calling rustup each time they login to shell
Notes
An example of how this process may look for zsh:
- calling
rustup updatealtersrustupandcargoversions, new cli arguments are added - after successful update, a post-install routine of completion generation started:
rustup completions zsh rustup >$RUSTUP_HOME/completions/_rustupmakes completions forrustuprustup completions zsh cargo >$CARGO_HOME/completions/_cargomakes completions forcargo- performing
rm -f ~/.zcompdump; compinitto reset and reload completions inzsh
- if user has
FPATH="$RUSTUP_HOME/completions:$CARGO_HOME/completions:$FPATH"in their.zshrc, the completions will work and be up-to-date
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 with the rustup completions, rustup update, and toolchain-switch entry points, and compare the installation guide's shell setup. Trace when post-install generation would run and where RUSTUP_HOME and CARGO_HOME completion files belong. Done means completions are regenerated after install, update, or switch without invoking rustup at shell startup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bash, fish, powershell, rust, zsh
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100