Zsh-plugin-rust

September 4, 2025 ยท View on GitHub

A simple Zsh plugin providing convenient aliases for working with Rust's Cargo, Rustc, and Rustup tools.

Features

  • Short aliases for common Cargo commands
  • Aliases for Rustc and Rustup utilities
  • Easy installation and usage

Aliases

AliasCommandDescription
ccargoRun Cargo
crcargo runRun project
ccrcargo clean && cargo runClean and run project
cclcargo cleanClean project
cicargo installInstall a Cargo package
cacargo addAdd a dependency
cvercargo --versionShow Cargo version
rcrustcRun Rust compiler
rcverustc --versionShow Rustc version
rurustupRun Rustup
ruverrustup --versionShow Rustup version
ruirustup installInstall Rust toolchain
rucrustup component addAdd Rustup component
rusrustup showShow Rustup info
rulrustup listList Rustup toolchains/components
rctrustc --targetCompile for target
rctlsrustc --target-listList available targets
rctirustc --target-installInstall target
rcturustc --target-uninstallUninstall target
rctvrustc --version --verboseShow verbose Rustc version

Installation

You can also use this plugin in a plain Zsh setup without Oh My Zsh.

  1. Clone the repository anywhere you like:

    git clone https://github.com/betterfetch/zsh-plugin-rust.git $DESTIATION
    
  2. Add it to your ~/.zshrc

    ...
    source ~/$DESTINATION/zsh-plugin-rust.plugin.zsh
    
  3. Reload your shell

    exec zsh
    

Installation with Oh My Zsh

  1. Clone or copy the plugin into your Oh My Zsh custom plugins directory:
    git clone https://github.com/betterfetch/zsh-plugin-rust.git $ZSH_CUSTOM/plugins/zsh-plugin-rust
    
  2. Add the plugin to ~/.zshrc
    plugins=(... zsh-plugin-rust)
    
  3. Reload your shell
    exec zsh