You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of #12606 - Angelin01:tab-completion-rustup-fallback-rustc, r=weihanglo
Tab completion for --target uses rustup but fallsback to rustc
### What does this PR try to resolve?
Fixes#12585
Currently, not only is the tab completion for `--target` inconsistent between bash and zsh, it depends on rustup and rustc respectively.
As discussed in the issue at hand, we'll use `rustup` if it is available and fallback to `rustc` if it is not, even if it is unfriendly.
### How should we test and review this PR?
Source the respective completion functions and test it out with `cargo build --target [TAB]`.
**I would appreciate if someone that regularly uses zsh would test this.** I did basic testing, but since I don't use zsh commonly I am unsure if everything is as it should be.
### Additional information
I switched to using `rustup target list --installed` instead of grabbing lines that contain "default" or "installed". I believe that any "default" target should be installed too, right?
0 commit comments