We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
Enabling history in the Elixir's Interactive Shell (IEx)
almirsarajcic
Created
Do you miss your favorite shell’s ability to remember commands you executed in the last shell session when using IEx? When you just start iex
and press the up arrow, nothing happens. Well, you can fix that simply by changing an environment variable.
Add the following to your ~/.bashrc
or ~/.zshrc
file:
export ERL_AFLAGS="-kernel shell_history enabled"
like this:
echo "\nexport ERL_AFLAGS=\"-kernel shell_history enabled\"" >> ~/.zshrc
source ~/.zshrc
iex
and start writing history.
Copy link
copied to clipboard