Rust
Tab completions for Rust/cargo in Zsh
The following steps helped me getting autocompletion for Rust/cargo working in Zsh:
-
Create folder to install the completion functions:
mkdir ~/.zfunc
-
Add folder to fpath in .zshrc before the
compinit
function:FPATH="$HOME/.zfunc:${FPATH}"
-
Use
rustup
to generate the completions:
$ rustup completions zsh > ~/.zfunc/_rustup
$ rustup completions zsh cargo > ~/.zfunc/_cargo