I was having some weird problems two, with some commands not even being recorded.
As people on the blog commented, I've followed and only include `history -a`. Running `history -n` would screw up the workflow of pressing the up cursor to scroll through the current terminal's history.