rust-lang / rust-lang/rustup

Offer/apply Shell autocompletion as part of `rustup-init.sh` ?

Open
#2,723 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement help wanted O-shell
Dominant language
Rust
Stars
7k
Forks
1.1k
Avg merge
22h 40m
Merged PRs (30d)
46

Description

When installing, we should detect the user's login shell if possible and then offer to add autocompletion sourcing to their init files. Perhaps this could be done generically in the $CARGO_HOME/env file, but if not, then we may need to do per-shell handling.


As an 'agile' story this might be:

  • As a users of rustup
  • When I freshly install Rust
  • I would like to have shell autocompletion so that when I type "rustup c" and press Tab then it expands that to "rustup check".

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading rustup-init.sh and the $CARGO_HOME/env handling, then trace how shell initialization files are selected during installation. Compare whether completion sourcing can be handled generically or requires per-shell logic. Done means a fresh install detects the login shell and offers working rustup completion setup in the appropriate init file.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, shell
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.