"rustup add target ..." could warn user that they meant "rustup target add ..."
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
The following error message isn't as helpful as it could be:
$ rustup add target x86_64-unknown-linux-gnux32
error: unrecognized subcommand 'x86_64-unknown-linux-gnux32'
Usage: rustup target <COMMAND>
For more information, try '--help'.
Solution you'd like
I think it would be more useful if we added: Did you mean "rustup target add x86_64-unknown-linux-gnux32"?.
Notes
"add target" is the more natural language way of writing the command, so I feel we should help users who make this mistake.
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 at rustup's CLI handling for the add target command and inspect how the current unrecognized-subcommand error is produced. Look for existing tests covering command errors or suggestions, then verify that rustup add target <triple> reports the proposed rustup target add <triple> hint without changing valid command behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 42/100