title: zsh preexec command modification
body: <p>Is there a way to modify the command that is about to execute?
  I would like to redirect the output to a file, as well as print it on the terminal.
   I found that <code>ls &gt; file.txt | cat</code> does the job, so I would like to add that <code>&gt; file.txt | cat</code> to any command that is about to execute.<br>
  Is there a better way to redirect to file and print to terminal? I am trying to make a logger.</p>