Skip to content

zoxide

Jump to a directory by a fragment of its name, ranked by how often and how recently you go there.

Homebrew formula

What it does

zoxide tracks directories you visit and scores them by frequency and recency (“frecency”). z hextra jumps to the highest-scoring directory matching that fragment, from anywhere.

z lab          # jump to the best match
zi lab         # pick from matches interactively (needs fzf)
z -            # previous directory

Notes

Add eval "$(zoxide init zsh)" to ~/.zshrc. zoxide init zsh --cmd cd replaces cd outright, which is the configuration most people end up at. The database lives in ~/.local/share/zoxide and can be imported from z, autojump or fasd.

Alternative to

AlternativeTypeTrade-off
autojumpOpen sourceThe original of this idea, Python-based
z (rupa)Open sourceA single shell script, no binary to install
fasdOpen sourceTracks files as well as directories, now unmaintained
CDPATHBuilt inBuilt into the shell, and enough for a fixed set of project roots

Install

brew install zoxide

Links

This post is licensed under CC BY 4.0 by the author.
Last updated on