Describe the problem you are trying to solve
From time to time people have difficulty installing components because of typos. Sometimes they're even really hard to spot, particularly for those who are dyslexic. For example, recently someone had difficulty installing the rls component because they kept typing rsl but reading it as rls and so couldn't tell what was wrong.
Describe the solution you'd like
Whenever we issue a component-not-found or target-not-found etc, consider adding a quick check of the available components/targets, sort them by levenshtein distance, and suggest the nearest one.
Notes
That way, instead of:
$ rustup component add rsl
error: toolchain 'stable-x86_64-unknown-linux-gnu' does not contain component 'rsl' for target 'x86_64-unknown-linux-gnu'
We'd maybe get something like:
$ rustup component add rsl
error: toolchain 'stable-x86_64-unknown-linux-gnu' does not contain component 'rsl' for target 'x86_64-unknown-linux-gnu' - Did you perhaps mean 'rls` ?
Describe the problem you are trying to solve
From time to time people have difficulty installing components because of typos. Sometimes they're even really hard to spot, particularly for those who are dyslexic. For example, recently someone had difficulty installing the
rlscomponent because they kept typingrslbut reading it asrlsand so couldn't tell what was wrong.Describe the solution you'd like
Whenever we issue a component-not-found or target-not-found etc, consider adding a quick check of the available components/targets, sort them by levenshtein distance, and suggest the nearest one.
Notes
That way, instead of:
We'd maybe get something like: