title: How do I tell Zsh to write the current shell's history to my history file?
body: <p>I work in a place that has gazillions of tools which require tons of options, so I rely on my shell's history significantly. I even back it up every now and then just to make sure I don't lose useful, lengthy commands.</p>
  
  <p>I just typed one of these commands and I want to make sure it's flushed to the history file, but I have a long-running job in the background and I can't type <code>exec zsh</code>. Is there something else I can do in this situation?</p>
  
  <p>(Sure, I could copy and paste it into a file, but it would be more logical for there to exist a <code>flush-history</code> command.)</p>