Tracking down a Zsh history data loss bug
Summary
This post documents a long-standing Zsh history truncation bug, detailing how the author traced the issue with Linux tracing tools (inotify, fatrace, strace, and bpftrace), reproduced it, and obtained a core dump to verify the root cause. The piece walks through history handling in Zsh, the patch path leading to fixes in Zsh 5.9.2, and practical notes on history configuration and debugging practices.