Show HN: Ze.sh – a z.sh-derived directory jumper that uses an event clock

Show HN (score: 5)
Found: June 22, 2026
ID: 5401

Description

Show HN: Ze.sh – a z.sh-derived directory jumper that uses an event clock z.sh and zoxide (and other frecency-based directory jumpers) couple score decay to wall-clock time. After any extended period of inactivity (e.g. holidays) the first directories visited on return dominate the ranking regardless of prior history, and the tool effectively has to relearn ranking from subsequent navigation.

The underlying issue is that wall-clock time during shell inactivity carries no information about directory relevance. ze.sh replaces wall-clock time with an event clock that advances one tick per cd action. Scores decay only while navigation is occurring. Inactive periods leave scores unchanged.

ze.sh also replaces the traditional frecency heuristic ([visit count] * recency) with an exponential moving sum over the event series (mathematically closely related to the exponential smoothing used for Unix load averages). This avoids a separate ranking artifact where a long-dormant directory with a large historical visit count jumps to the top on first revisit.

The implementation is a single shell file, compatible with bash, zsh, ksh93, and mksh. The database format extends z.sh's format with one additional field, the timestamp field is repurposed to hold the event clock counter.

A related project of mine, SD, also uses the event clock and exponential moving sum paradigms but stores the full event history rather than aggregate state. ze.sh explores how far the same ideas can be pushed while remaining close to the original z.sh design.

I would be interested in hearing whether others have run into the "inactivity-cliff" behaviour, and whether there are solutions to the problem that I have not considered.

More from Show

Show HN: Socket to Me, a static file server that runs in the browser

Show HN: Socket to Me, a static file server that runs in the browser The service lets you share an entire folder - not just a single file - with anyone on the Internet in a single click.<p>Under the hood, GET responses are hydrated with file fragments streamed over a duplex WebSocket connection. Close the browser tab, and the server disappears. Files can also be password-protected.<p>I built it because I needed a way to share a static website with a client without first uploading the work to a cloud service.

No other tools from this source yet.