>_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
| base | co = cargo |
| run / build / release | cr, cb, cbr |
| test / clippy / fmt / fix | ct, ccy, cfm, cfi |
| add / install / install-update / search / fetch | cad, ci, ciu, cs, cfe |
| package / publish / clean | cpa, 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:
- zsh-better-npm-completion — cache-aware
npm installcompletion - zsh-cpan-completion — live MetaCPAN
cpan/cpanmcompletion - zsh-dotnet-completion — dotnet CLI completion
- zsh-expand — spacebar expansion (11,683 tests)
- zsh-gem-completion — ruby
gem installremote completion - zsh-git-acp — 159 git aliases + add/commit/push keybindings
- zsh-git-repo-cache — index every git repo on disk
- zsh-learn — MySQL-backed learning collection / quiz
- zsh-more-completions — 33,175-file mega completion corpus
- zsh-nginx — nginx commands + service-wrapper aliases
- zsh-pip-description-completion — pip remote completion with descriptions
- zsh-sed-sub — in-place sed substitution on the command line
- zsh-sudo — ESC ESC to prepend sudo
- zsh-xcode-completions — xcodebuild / xcrun / swift completion