fix history misbehavior in zsh