It'd be very convenient if this script support zsh users. From my first inspection--since you're using an emulation of a zsh feature to provide the support :)--this should be pretty easy, I'd think--just a matter of using ZSH_VERSION to detect zsh, not installing the emulation of preexec, and slightly different syntax for activating the preexec hook. But I'm not enough of a shell expert to feel confident doing this myself.
Sorry, I'm not able to help with figuring it out for zsh. #12 is the official ticket for discussing zsh support, closing this ticket in favour of that.
It'd be very convenient if this script support zsh users. From my first inspection--since you're using an emulation of a zsh feature to provide the support :)--this should be pretty easy, I'd think--just a matter of using ZSH_VERSION to detect zsh, not installing the emulation of preexec, and slightly different syntax for activating the preexec hook. But I'm not enough of a shell expert to feel confident doing this myself.
Any help would be appreciated!