add command history by up or down in textfield