If you are using the latest version of Erlang, OTP 20 now ships with shell history, so you can use
Ctrl-n or the up/down arrow keys.
The shell history is turned off by default though, so you will have to turn it on by adding the following to your
export ERL_AFLAGS="-kernel shell_history enabled"
Once you do that make sure to
source your bash config file or open a new window.
Every subsequent iex session will now have shell history. 🚀Tweet