Unfortunately I don't remember exactly how I did it at past but I'll try to help:
On my previous machine, with zsh, I could define my .zsh_history to be created per dir. That way I could see the history per dir.
The downside is multiple .zsh_history files per dir plus no universal .zsh_history (the default)
EDIT: I think I have found how I have done it. I have this currently on my .zsrch HISTFILE=~/.zhistory
removing the ~, will force zsh to create a .zhistory file on your current dir.
Hope this helps.