linenoiseHistoryAdd() reworked + duplicated lines prevented.