A rewritten datafile write path, a faster read path, a 264-test suite, and CI across five platforms.
Highlights
- Faster. Zsh-z outperforms
rupa/zat adding, searching, and listing, both on modern Zsh and on the earliest supported version (Zsh v4.3.11). - Writes never block your prompt, on any platform. The per-prompt
--addruns as a single disowned job (&!) everywhere, including Cygwin and MSYS2, which previously wrote in the foreground. - Safer concurrent writes. There is a dedicated lockfile; locks are always released, and write failures now return a nonzero status instead of being swallowed. On Cygwin and MSYS2, a rename Windows refuses is retried briefly.
- Your database is now
0600— readable only by you (#92). COMPLETE_ALIASESjust works — no manualcompdefline.- Fixed
can't clobber parameter tmpfdon some Zsh builds (#81). - A misconfigured
ZSHZ_DATAno longer closes your shell — it reports and returns, and stays quiet at the prompt (#103; props @ahjota). z -xcan remove an entry whose directory is gone, and no longer crashes Zsh 4.3.11 on a path with a missing top-level component.- A version check on an unsupported Zsh no longer risks exiting your shell.
Smaller changes you may notice
-rand-tcan no longer be combined — the contradiction is now an error (previously-tsilently took precedence).- A
~/.z.lockfile appears next to your database, created0600and never removed. Wherezsh/systemis unavailable you will see a short-lived~/.z.lock.ddirectory instead. - An existing
0644database is tightened to0600on the next write.
Compatibility
The database format and existing ZSHZ_* and legacy _Z_* settings remain compatible. v2.0 adds ZSHZ_LOCK_TIMEOUT. Zsh 4.3.11 and later. Tested in CI on Linux, macOS, MSYS2, Cygwin, and a from-source Zsh 4.3.11 build. Tested by hand on Solaris and FreeBSD.