README.md

April 13, 2026 · View on GitHub

CI cargo badge zsh badge license badge

>>> zsh-cargo-completion <<<

// TURBOCHARGE YOUR CARGO WORKFLOW WITH TAB COMPLETIONS + ALIASES //


 ╔══════════════════════════════════════════════════════════════╗
 ║  ALL OMZ CARGO COMPLETIONS + REMOTE CRATE SEARCH VIA TAB   ║
 ║  cargo add <TAB> / cargo install <TAB> = LIVE CRATE LOOKUP ║
 ╚══════════════════════════════════════════════════════════════╝

> DEMO_

cargo add rand <tab>

cargo add / cargo install + <TAB> queries cargo search and completes remote crate names in real time.


> ALIASES_

# ── CORE ──────────────────────────────────────────────
alias co=cargo                  # base command
alias cr='cargo run'            # run project
alias cb='cargo build --release'# release build

# ── CODE QUALITY ──────────────────────────────────────
alias ct='cargo test'           # run tests
alias ccy='cargo clippy'        # lint
alias cfm='cargo fmt'           # format
alias cfi='cargo fix'           # auto-fix
alias cfa='cargo fix --allow-dirty --allow-staged;cargo clippy --all-targets --fix -- -D warnings; cargo fmt'

# ── DEPENDENCIES ──────────────────────────────────────
alias cad='cargo add'           # add crate
alias ci='cargo install'        # install binary
alias ciu='cargo install-update -a' # update installed
alias cs='cargo search'         # search crates.io
alias cfe='cargo fetch'         # fetch dependencies

# ── PUBLISH ───────────────────────────────────────────
alias cpa='cargo package'       # package crate
alias cpl='cargo publish'       # publish to crates.io
alias ccl='cargo clean'         # clean target/

> INSTALL_

// ZINIT (RECOMMENDED) //

~/.zshrc

source "$HOME/.zinit/bin/zinit.zsh"
zinit ice lucid nocompile
zinit load MenkeTechnologies/zsh-cargo-completion
// OH MY ZSH //
cd "$HOME/.oh-my-zsh/custom/plugins" && git clone https://github.com/MenkeTechnologies/zsh-cargo-completion.git

Add zsh-cargo-completion to the plugins array in ~/.zshrc

// MANUAL //
git clone https://github.com/MenkeTechnologies/zsh-cargo-completion.git

Source zsh-cargo-completion.plugin.zsh from your ~/.zshrc or any startup script.


MIT License | MenkeTechnologies