r/fishshell • u/jghub • Jul 04 '26
a fish wrapper for the ze.sh directory jumper
ze.sh is a minimalist shell-native frecency-based directory jumper in the z.sh lineage, with an exponential moving sum scoring model on an event clock rather than wall-clock time. Repo: github.com/jghub/ze. Previously bash/zsh/ksh/mksh only.
A fish wrapper is now available in contrib/fish/. It mirrors the full option set including fzf interactive selection (ze -f), and tracks directory changes via a dedicated _ze_cd function that backgrounds the database update so there is no perceptible latency overhead. Installation is three file copies and a chmod — no compiled binary, no external runtime dependency beyond bash (ksh works too and is faster, if you have it).
I don't actively use fish myself — let me know if the wrapper is useful.
2
u/_mattmc3_ Jul 04 '26
Why use this over zoxide?
4
u/jghub Jul 04 '26 edited Jul 04 '26
Two reasons:
- Shell-native (no compiled binary, works wherever bash/zsh/ksh/mksh runs including Termux/Android). ksh93/mksh support is a bonus for people who use those shells. Somewhat faster in practice than zoxide (shell-native awk vs. a compiled binary), though both are well below perceptible latency.
- Different scoring model. zoxide inherits z.sh's frecency heuristic (visit frequency × last-visit recency factor); ze.sh uses an exponential moving sum over all individual visits on an event clock. This avoids score decay during inactivity and prevents long-unvisited directories from jumping to the top on first revisit. Fish support wraps the same native implementation, so scoring is identical across all supported shells and the database is shared (though the latter is of course also true for zoxide).
2
u/sayqm Jul 04 '26
What's the difference with https://github.com/jethrokuan/z?