Setup
eval "$(zoxide init bash)"
Enable in ~/.bashrc
eval "$(zoxide init zsh)"
Enable in ~/.zshrc, after compinit
zoxide init fish | source
Enable in config.fish
zoxide init posix --hook prompt
Generic POSIX shell setup
zoxide init <shell> --cmd <name>
Rename z and zi, e.g. j and ji
zoxide init <shell> --cmd cd
Replace cd itself
zoxide init <shell> --no-cmd
Define no z or zi
The functions stay available as __zoxide_z and __zoxide_zi, so
you can bind them yourself.
zoxide init <shell> --hook <hook>
When to count a visit: none, prompt, pwd
pwd (default) counts when the directory changes; prompt counts
at every prompt; none never counts.
Jumping
z <keyword>
Jump to the best matching directory
z <kw1> <kw2>
Match directories containing all words
Words must appear in the path in this order; the last one must
match the final path component.
z <kw> /
Jump to a subdirectory starting with kw
z <path>
Plain cd for an existing path
z -
Back to the previous directory
zi <keyword>
Choose among matches with fzf
z <keyword> <Space><Tab>
Show interactive completions
Works in bash 4.4+, fish and zsh; needs fzf.
Query
zoxide query <keyword>
Print the best match without jumping
zoxide query -l
List all directories, best first
zoxide query -l <keyword>
List every match for a keyword
zoxide query -ls
List with scores
zoxide query -i <keyword>
Pick interactively with fzf
zoxide query --exclude <path> <kw>
Leave one path out of the results
zoxide query --all <keyword>
Include directories that no longer exist
Database
zoxide add <path>
Add or bump a directory by hand
zoxide remove <path>
Delete a directory from the database
zoxide import --from z <file>
Import a z, fasd, z.lua or zsh-z database
zoxide import --from autojump <file>
Import autojump paths (no scores)
zoxide import --from z --merge <file>
Merge into a non-empty database
Without --merge the import fails if the database already has
entries.
zoxide --version
Show the installed version