#!/usr/bin/env zsh # ── zoxide.zsh : smarter cd — "frecency" jumping ───────────────────────────── # The init (`eval "$(zoxide init zsh)"`) lives in core.zsh and installs a chpwd # hook, so EVERY plain `cd` quietly teaches zoxide. This module adds tuning + # management helpers. `cd` itself is left as the builtin (safe); `z` is the jump. # # z jump to best-ranked dir matching the fragment(s) # zi interactive fzf pick among matches # zz jump back to previous dir (z -) # zl list the ranked database (with scores) # zq show which dir `z ` would pick (dry run) # za manually add / boost a directory # zrm remove a directory from the database # zedit interactive database editor if command -v zoxide >/dev/null 2>&1; then # collapse symlinked paths so /tmp and /private/tmp don't both get ranked. export _ZO_RESOLVE_SYMLINKS=1 # never rank this noise (trash, temp, git internals, mounted volumes). export _ZO_EXCLUDE_DIRS="$HOME/.Trash/*:/private/var/*:/tmp/*:*/.git/*:/Volumes/*" alias zl='zoxide query -l -s' # ranked list, highest frecency first alias zq='zoxide query' # resolve a fragment without cd-ing alias za='zoxide add' # add/boost a dir manually alias zrm='zoxide remove' # forget a dir alias zedit='zoxide edit' # TUI editor for the database zz() { z - } # toggle to previous directory fi