Shell history not included when using io:read/1 in OTP 27

Hi,

When I’m using OTP-27, it seems like the Erlang shell history does not include what I type in
as a response to a io:read/1 prompt. I guess it has to do with the improved Erlang shell?

A bit unfortunate for tools like edbg that provides it’s own “prompt-session”, so I wonder if
it could be solved somehow, e.g by tapping into the shell history mechanism somehow?

Cheers, Tobbe

1 Like

That change was introduced in 26. To get line history you need to send get_until I/O requests.

In 28 there is a new option for io:setopts/2 that you can use that explicitly allows you to say whether you want a read request to end up in the shell history or not.

1 Like

Aha, great, thanks!

Cheers, Tobbe