A smarter cd command. Supports all major shells.
It remembers which directories you use most frequently, so you can “jump” to them in just a few keystrokes. zoxide works on all major shells.
GitHub - ajeetdsouza/zoxide: A smarter cd command. Supports all major shells.
# Add a Folder and All Subfolders Recursively
1
2
|
fd -t d -0 . ~/Simon/Sync | xargs -0 -I{} zoxide add {}
fd -t d -0 . ~/Pictures | xargs -0 -I{} zoxide add {}
|
Now I can Fuzzy find in yazi and have all folders available, even if I did not cd into them.
# Add with Higher Prio
Or, to make it higher prio, add multiple times - Reload shell, then re-seed Sync with higher weight (loop add → higher rank, survive aging):
1
2
3
4
|
for i in 1 2 3 4 5; do
fd -t d -0 . ~/Simon/Sync | xargs -0 -I{} zoxide add {}
done
fd -t d -0 . ~/Pictures | xargs -0 -I{} zoxide add {}
|
# Configs
# SQLite DB
Stored at: /home/sspaeti/.local/share/zoxide/db.zo
# Paths
1
2
|
export _ZO_MAXAGE=1000000 # 100x default, room for many dirs
export _ZO_EXCLUDE_DIRS="$HOME/.cache/*:*/.git/*:*/node_modules/*:*/.venv/*:*/__pycache__/*:*/target/*:*/dist/*:*/build/*"
|
# Help
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
A smarter cd command for your terminal
Usage:
zoxide <COMMAND>
Commands:
add Add a new directory or increment its rank
edit Edit the database
import Import entries from another application
init Generate shell configuration
query Search for a directory in the database
remove Remove a directory from the database
Options:
-h, --help Print help
-V, --version Print version
Environment variables:
_ZO_DATA_DIR Path for zoxide data files
_ZO_ECHO Print the matched directory before navigating to it when set to 1
_ZO_EXCLUDE_DIRS List of directory globs to be excluded
_ZO_FZF_OPTS Custom flags to pass to fzf
_ZO_MAXAGE Maximum total age after which entries start getting deleted
_ZO_RESOLVE_SYMLINKS Resolve symlinks when storing paths
|
Origin: zsh shell