Usage
Basics
So you have the z and zi commands to jump around. z jumps to the highest scored match from its database or the given folder if the path exists. If you are unsure about what zoxide will find, use zi instead.
You can also z as regular cd command, z alone with come back to $HOME, z - will come back in the previous folder, z some/long/absolute/or/relative/path also works.
The zoxide CLI also has some interesting commands
zoxide add: Add a directory or increase its score, but do not jump inside. Useful for indexing a lot of folders.
zoxide query: query zoxide database externally ! Could be very useful for some custom automations...
zoxide edit: To see the full database zoxide has built over usage, you can run zoxide edit, you can see scores, you can manually remove paths, and manage the scores.
sam> zoxide edit
┌─────────────────────────────────────────────────────────────
│ > ▌ < 933/933
│ ctrl-r:reload ctrl-d:delete
│ ctrl-w:increment ctrl-s:decrement
│
│ SCORE PATH
│ ▌ 404.0 /home/sam/code/delibay/frontend
│ 350.0 /home/sam/HEIG/year2/WEB/projects/WEB-training
│ 284.0 /home/sam/code/productivity
│ 180.0 /home/sam/HEIG/year2/PCO
│ 100.0 /home/sam/code/betterlx
│ 95.5 /home/sam/code/setup
Final usage
Now, every time you would like to jump to a folder not present in current working directory, use z instead of a long cd command. Try to type a pretty short pattern and not the entire folder name like z syl or even multiple patterns like z prg1 lab 3. When you are unsure or it has matched the wrong folder, use zi to gain some visibility on the scores and filters.
If you want to rearrange 2 folders with the same name to match the second and not the first, use zoxide edit to manually fix the scores, so the second one will be the first to match.
If you just created a folder, zoxide doesn't know it but you can give the relative or absolute path to jump inside and index it, like z newfolder/archives.
As a final note z test will jump into test if it is present in the current directory, if not it will look for path matching test in its database and the highest scored path.