title: Zsh: Delete all files except the one in highest lexicographic sorting order
body: <p>I have a set of files matching a certain glob pattern (say: *.txt). I want to remove all of them except the one which is highest in lexicographic order. </p>
  
  <p>I tried to find various solutions, but even the best one I came out with, is ugly:</p>
  
  <pre><code>set -A files *(N)
  set -A to_remove ${(O)files}
  shift to_remove
  foreach f in $to_remove
  do
    echo rm $f
  done
  </code></pre>
  
  <p>(I did not write <code>rm $to_remove</code>, because this would give an error if <code>to_remove</code> is empty).</p>
  
  <p>Please give some suggestions if you know a simpler way to do it.</p>