$ brew install z
==> Downloading https://github.com/rupa/z/archive/v1.9.tar.gz
Already downloaded: /home/vagrant/.cache/Homebrew/z-1.9.tar.gz
==> Caveats
For Bash or Zsh, put something like this in your $HOME/.bashrc or $HOME/.zshrc:
. `brew --prefix`/etc/profile.d/z.sh
==> Summary
/home/vagrant/.linuxbrew/Cellar/z/1.9: 4 files, 19K, built in 1 second
$ z
fish: Unknown command 'z'