explicitly clear out the lines below or else it shows overlapping lines; trim history due to ReadlineClient adding a newline, which becomes an extra one, when we try to display it