trim history back to 1000 commands