Setup Elixir History:
touch ~/.iex_history
- Set the ERL_AFLAGS env var:
bash:
echo "export ERL_AFLAGS='-kernel shell_history enabled'" >> ~/.bashrc
zsh:echo "export ERL_AFLAGS='-kernel shell_history enabled'" >> ~/.zshrc
fish:set -Ux ERL_AFLAGS '-kernel shell_history enabled'
- Add some history:
$ iex (/f/s/2/s/script_drop) 12:09:25 Erlang/OTP 22 [erts-10.4.3] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [hipe] Interactive Elixir (1.9.0) - press Ctrl+C to exit (type h() ENTER for help) iex(1)> :hi :hi iex(2)> BREAK: (a)bort (c)ontinue (p)roc info (i)nfo (l)oaded (v)ersion (k)ill (D)b-tables (d)istribution ^C
- Load the history:
$ iex (/f/s/2/s/script_drop) 12:09:25 Erlang/OTP 22 [erts-10.4.3] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [hipe] Interactive Elixir (1.9.0) - press Ctrl+C to exit (type h() ENTER for help) iex(1)> HIT_THE_UP_ARROW iex(1)> :hi