Installing ZUnit

Before you start using ZUnit, you’ll first need to install it on your system. There is a growing number of different ways to install ZUnit.

Requirements

Installing with Zulu will handle building ZUnit from source, and installing all dependencies for you.

zulu install --branch next zunit

Installing with zplug

ZUnit and its dependencies can all be installed with zplug.

zplug 'molovo/revolver', \
  as:command, \
  use:revolver
zplug 'zunit-zsh/zunit', \
  at:next, \
  as:command, \
  use:zunit, \
  hook-build:'./build.zsh'

Installing with Homebrew

ZUnit and its dependencies can all be installed with Homebrew.

brew install --devel zunit-zsh/zunit/zunit

Installing Manually

To install manually, install the dependencies, and then download the ZUnit executable straight into your $path.

# Install revolver
curl -L https://raw.githubusercontent.com/molovo/revolver/master/revolver > /usr/local/bin/revolver

# Install ZUnit into $path
curl -L https://github.com/zunit-zsh/zunit/releases/download/__version__/zunit > /usr/local/bin/zunit

# Optional, install ZUnit ZSH completion into $fpath
curl -L https://github.com/zunit-zsh/zunit/releases/download/__version__/zunit.zsh-completion > "${fpath[1]}/_zunit"

Building From Source

To build ZUnit from source, once you’ve installed the dependencies just clone the git repository and run the included build.zsh script. Once done, copy the zunit executable to somewhere in your $path.

# Install revolver
curl -L https://raw.githubusercontent.com/molovo/revolver/master/revolver > /usr/local/bin/revolver

# Build ZUnit from source
git clone https://github.com/zunit-zsh/zunit
cd zunit
git checkout next
./build.zsh

# Copy zunit into $path
cp zunit /usr/local/bin

# Optional, copy ZUnit ZSH completion into $fpath
cp zunit.zsh-completion "${fpath[1]}/_zunit"