Handle history of input line.