search through the history of a command with up and down arrows