Earlier quoted context omitted.
zsh used to do this for me (back when I used it; switched back to bash about a year ago now), and it was the most _annoying_ thing it ever did. My typical workflow (when working on a software project) involves a pair of terminals for compiling and execution, an editor window (whether gvim or kate/kile/kdevelop etc.), and a documentation terminal for manpages. Oftentimes my execution lines are somewhat long -- enablin…
You could have simply turned history sharing off...
For future reference, I use the following Zsh history options:
setopt incappendhistory
setopt extendedhistory
setopt histignorespace
setopt histignoredups