Localize shell history for projects

I frequently work on multiple projects in parallel, the terminal application always open and in use.
Shell history is very helpful for recalling commands, but I prefer to have just those available in the history which relate to the project for the current folder.
It would be nice to keep the command-line history separate depending on the folder open. Linux/macOS terminal shells are able to do that. I am configuring zsh to keep history apart based on the (current) working directory.

