#!/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 <frag> jump to best-ranked dir matching the fragment(s)# zi <frag> interactive fzf pick among matches# zz jump back to previous dir (z -)# zl list the ranked database (with scores)# zq <frag> show which dir `z <frag>` would pick (dry run)# za <dir> manually add / boost a directory# zrm <dir> remove a directory from the database# zedit interactive database editorifcommand -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/*"aliaszl='zoxide query -l -s'# ranked list, highest frecency firstaliaszq='zoxide query'# resolve a fragment without cd-ingaliasza='zoxide add'# add/boost a dir manuallyaliaszrm='zoxide remove'# forget a diraliaszedit='zoxide edit'# TUI editor for the database zz(){ z - }# toggle to previous directoryfi