If you use more than one terminal during your workday, you've probably been annoyed that your shell history always seems incomplete. This is due to most shells overwriting existing history data in lieu of their own history when a session is closed. Fortunately, both bash and zsh support variables to avoid this behavior.
For bash, you should be able to just add the following to your bashrc:
shopt -s histappend
For zsh, I use the following history related options:
setopt appendhistory histignoredups
setopt histignorespace extended_history
setopt inc_append_history share_history