When generating completions for Cargo, if the Rust sysroot
(i.e. `rustc +${${(z)$(rustup default)}[1]} --print sysroot`) contains
spaces, Cargo completions will not work because the spaces are not
escaped, thus passing two arguments to the "source" command instead of
one. The spaces need to be escaped for this to work.
By default, `typeset` defines variables locally unless in the main scope.
This is specially bad when using `omz plugin load`, which happens inside
a function, so the declared variables don't continue being defined when
the function finishes and the main scope reappears.
BREAKING CHANGE: `cargo` and `rustup` plugins have been moved to the `rust` plugin
since they're part of the Rust toolchain. If you're using these, update your .zshrc
file to use `rust` instead.
Closes#10270
Co-authored-by: Marc Cornellà <hello@mcornella.com>