github agkozak/zsh-z v2.0.0
Zsh-z v2.0.0

4 hours ago

A rewritten datafile write path, a faster read path, a 264-test suite, and CI across five platforms.

Highlights

  • Faster. Zsh-z outperforms rupa/z at 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 --add runs 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_ALIASES just works — no manual compdef line.
  • Fixed can't clobber parameter tmpfd on some Zsh builds (#81).
  • A misconfigured ZSHZ_DATA no longer closes your shell — it reports and returns, and stays quiet at the prompt (#103; props @ahjota).
  • z -x can 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

  • -r and -t can no longer be combined — the contradiction is now an error (previously -t silently took precedence).
  • A ~/.z.lock file appears next to your database, created 0600 and never removed. Where zsh/system is unavailable you will see a short-lived ~/.z.lock.d directory instead.
  • An existing 0644 database is tightened to 0600 on 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.

Don't miss a new zsh-z release

NewReleases is sending notifications on new releases.