I have rustup+rust+cargo installed using the official installation script.
How do I enable shell completions, to be able to type cargo <TAB> in the terminal and see the possible commands such as cargo check?
You can run rustup completions and follow the instructions. For example, for bash you can run
mkdir -p ~/.local/share/bash-completion/completions
rustup completions bash > ~/.local/share/bash-completion/completions/rustup
rustup completions bash cargo > ~/.local/share/bash-completion/completions/cargo
to generate completions for rustup and cargo respectively. Consult rustup completions for further details, e.g. for configuring zsh and fish completions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With