fix(rust): use default toolchain when completing cargo

This commit is contained in:
Marc Cornellà 2021-12-29 17:18:21 +01:00
parent 4d8d7bed50
commit a01cf85627
No known key found for this signature in database
GPG Key ID: 0314585E776A9C1B

View File

@ -25,4 +25,7 @@ fi
# Generate completion files in the background # Generate completion files in the background
rustup completions zsh >| "$ZSH_CACHE_DIR/completions/_rustup" &| rustup completions zsh >| "$ZSH_CACHE_DIR/completions/_rustup" &|
rustup completions zsh cargo >| "$ZSH_CACHE_DIR/completions/_cargo" &| cat >| "$ZSH_CACHE_DIR/completions/_cargo" <<'EOF'
#compdef cargo
source $(rustc +${${(z)$(rustup default)}[1]} --print sysroot)/share/zsh/site-functions/_cargo
EOF