The read function in the wiki doesn't specify the second argument you can input to it. This argument is a table that contains strings theses strings will are then used with the up / down keys in the shell for example to select a input that was made previously.
local tLast = {} while true do local input = read(nil,tLast) tLast[#tLast + 1] = input end