Skip to content

Installation

Package

Homebrew

zsh-abbr is available on Homebrew. Run

shell
brew install olets/tap/zsh-abbr

and follow the post-install instructions logged to the terminal.

TIP

brew upgrade will upgrade you to the latest version, even if it's a major version change.

Want to stay on this major version until you choose to upgrade to the next? When installing zsh-abbr with Homebrew for the first time, run

shell
brew install olets/tap/zsh-abbr@6

If you've already installed olets/tap/zsh-abbr with Homebrew, you can switch to the v6 formula by running

shell
brew uninstall --force zsh-abbr && brew install olets/tap/zsh-abbr@6

Linux package repositories

WARNING

These may lag behind the official release channels.

Community members have created packages in some Linux distros' package repositories. These include

There may be others out there. If you know of another, please make a pull request to this page!

Plugin

You can install zsh-abbr with a zsh plugin manager, including those built into frameworks such as Oh-My-Zsh (OMZ) and prezto. Each has their own way of doing things. Read your package manager's documentation or the zsh plugin manager plugin installation procedures gist; Fig users can install zsh-abbr from its page in the Fig plugin directory.

WARNING

v6 is compatible with most but not all plugin managers in the zsh plugin manager plugin installation procedures gist. If your plugin manager is not compatible, you can still install zsh-abbr manually or with Homebrew.

Click to show/hide details for various package managers.
  • Antigen: may be incompatible (if you have a working solution, please suggest an edit).

  • zgem: consider upvoting the open issue and open PR which would unlock support.

  • zgen: specify the main branch:

    shell
    zgen load olets/zsh-abbr . main
  • zit: specify the main branch:

    shell
    zit-install "https://github.com/olets/zsh-abbr#main" ".zsh-abbr"
  • zplug may be incompatible (if you have a working solution, please suggest an edit).

  • zr: 🆕 compatible as of zr v1.2.0 (December 10, 2024).

    • If you haven't added zsh-abbr to your zr plugins yet, update zr first:

      shell
      cargo install zr

      and then update your .zshrc.

    • If you've already added zsh-abbr to your zr plugins in your .zshrc and a "problem installing dependencies" message was logged to your terminal: update zr, then delete zr's cached copy of zsh-abbr, and finally restart the shell to have zr install a fresh copy of zsh-abbr.

      shell
      cargo install zr
      rm -rf $ABBR_SOURCE_PATH
      exec zsh
  • zsh4humans: refer to the zsh4humans integration.

TIP

Want to stay on this major version until you choose to upgrade to the next? Use your package manager's convention for specifying the branch v6.

After adding the plugin to the manager, it will be available in all new terminals. To use it in an already-open terminal, restart zsh in that terminal:

shell
exec zsh

Manual

Heads up

Getting a warning "There was a problem finishing installing dependencies"? If you cloned the Git repo, make sure you initialized the plugin's submodules. A simple solution is to pass --recurse-submodules when git cloneing.

  • Either download the archive of the release of your choice from https://github.com/olets/zsh-abbr/releases and expand it (ensures you have the latest official release). Follow the release notes: you want the file at

    https://github.com/olets/zsh-abbr/releases/download/<version>/<version>.tar.gz

    not one of the ones at

    https://github.com/olets/zsh-abbr/archive/refs/tags/<version>.<extension>

    Want to automate downloading an archive?

    Advanced users can script downloading the latest release's tarball without depending on Git.

    Click to display details.

    One way is to use the GitHub REST API to find the latest release's associated tag, and then download the associated release's same-named asset. Learn more in GitHub's "Get the latest release" REST API docs.

    json
    // JSON response
    
    {
      // ...
      "tag_name": // …
      // ...
    }

    The URL pattern for the correct tarball to download is:

    https://github.com/olets/zsh-abbr/releases/download/<latest release's tag name>/<latest release's tag name>.tar.gz
  • or clone a single branch:

    shell
    git clone https://github.com/olets/zsh-abbr --recurse-submodules --single-branch --branch <branch> --depth 1

    Replace <branch> with a branch name. Good options are main (for the latest stable release), next (for the latest release, even if it isn't stable), or v6 (for releases in this major version).

Then add source path/to/zsh-abbr.zsh to your .zshrc (replace path/to/ with the real path), and restart zsh:

shell
exec zsh

Updating

If you downloaded an archive, download the latest and update your .zshrc if necessary.

If you cloned the repo, cd into the clone and run

shell
git pull --recurse-submodules --depth 1

Except where otherwise noted, © 2024 by Henry Bley-Vroman and licensed under zsh-abbr's license.