Rust, cargo with ZSH (auto complete)

1 min read
It is as simple as:
rustup completions zsh > ~/.zfunc/_rustup
rustup completions zsh cargo > ~/.zfunc/_cargo
With a TAB
you get the auto-complete or the options available:
❯ cargo b
b -- alias: build
bench -- Execute all benchmarks of a local package
build -- Compile a local package and all of its dependencies
If ZSH isn’t yet configured, create the folder mkdir ~/.zfunc
and in ~/.zshrc
:
export FPATH="$HOME/.zfunc:${FPATH}"
compinit
0
Subscribe to my newsletter
Read articles from Thomas Brennetot directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Thomas Brennetot
Thomas Brennetot
10+ years most with Ruby on Rails and JavaScript frontend and some Go. My first language is C for 3 years in university.