// ZSH-CARGO-COMPLETION — LIVE CRATES.IO COMPLETION FOR cargo add / cargo install

zsh plugin · ships every OMZ cargo completion · live cargo search-backed completer for remote crate names

GitHub Issues
// Color scheme

>_ZSH-CARGO-COMPLETION

Cargo completion with a live remote index. Every OMZ cargo completion plus a live cargo search-backed completer for cargo add and cargo install. Type cargo add <TAB> and the remote crates.io index is queried in real time.

Install

# Zinit (recommended)
zinit ice lucid nocompile
zinit load MenkeTechnologies/zsh-cargo-completion

# Oh My Zsh
git clone https://github.com/MenkeTechnologies/zsh-cargo-completion \
    "$HOME/.oh-my-zsh/custom/plugins/zsh-cargo-completion"
# then: plugins+=(zsh-cargo-completion)

# Manual
git clone https://github.com/MenkeTechnologies/zsh-cargo-completion
source zsh-cargo-completion/zsh-cargo-completion.plugin.zsh

Aliases

baseco = cargo
run / build / releasecr, cb, cbr
test / clippy / fmt / fixct, ccy, cfm, cfi
add / install / install-update / search / fetchcad, ci, ciu, cs, cfe
package / publish / cleancpa, cpl, ccl

The full alias table is in the README "ALIASES" section.

Examples

cargo add <TAB>          # live crate name completion from crates.io
cargo install <TAB>      # same remote completer
cargo build              # all OMZ cargo subcommand completion still works
cargo test --features <TAB>
cad ser                  # add serde via the cad alias

Sibling plugins

Part of the MenkeTechnologies zsh plugin family — the MenkeTechnologiesMeta umbrella: