completions/rustc: Don't autoinstall nightly toolchain

Just calling `rustc +nightly` is enough to trigger automatic
installation.

Fixes #12202
This commit is contained in:
Fabian Boehm
2025-12-23 19:49:14 +01:00
parent 5715d143a5
commit dd97842964

View File

@@ -34,6 +34,10 @@ function __fish_rustc_z_completions
return
end
if not command -q rustup; or not rustup toolchain list | string match -q 'nightly*'
return
end
set -l rust_docs (rustc +nightly -Z help 2>/dev/null |
string replace -r '^\s+' '' | string replace -ar ' +' ' ' | string replace -r '=val +-- +' '=\t')