Add executed commands to the history