history autocompetion with up and down arrow keys