Get in touch

Send an email to: lammers@gmail.com.
Or find me online at: Github, X

Tab completions for Rust/cargo in Zsh

The following steps helped me getting autocompletion for Rust/cargo working in Zsh:

  1. Create folder to install the completion functions: mkdir ~/.zfunc

  2. Add folder to fpath in .zshrc before the compinit function: FPATH="$HOME/.zfunc:${FPATH}"

  3. Use rustup to generate the completions:

$ rustup completions zsh > ~/.zfunc/_rustup
$ rustup completions zsh cargo > ~/.zfunc/_cargo