Skip to content

Commit

Permalink
fix(rust): use default toolchain when completing cargo
Browse files Browse the repository at this point in the history
  • Loading branch information
mcornella committed Dec 29, 2021
1 parent 4d8d7be commit a01cf85
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion plugins/rust/rust.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,7 @@ fi

# Generate completion files in the background
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

1 comment on commit a01cf85

@mcornella
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed on account of @bjorn3's suggestion. Thanks!

Please sign in to comment.