cmd_history: don't trash uncommitted changes