completions/rustup: Fix incorrect component names

The components with the form abc-x86_64-unknown-linux-gnux32 were ending
up generating invalid components of the form abcx32, which is incorrect.
This commit is contained in:
Mahmoud Al-Qudsi 2024-05-08 18:43:28 -05:00
parent 9e6a661c00
commit 671d128a3e

View File

@ -22,8 +22,9 @@ set -l rustup_show \
help
# rustup does not really expose a mechanism of retrieving a list of all valid components without the archs appended
# Just print the list of installable x86_64-unknown-linux-gnu components for everyone
function __rustup_components
rustup component list | string match -r "^\S+" | string replace -f -- -x86_64-unknown-linux-gnu ""
rustup component list | string match -r "\S+" | string replace -rf -- "-x86_64-unknown-linux-gnu.*" ""
end
# function __rustup_installable_components