I was looking into the state of multi-line history in IEx. To be clear, all I want is the ability to hit the up arrow and get back all of the lines of a multi-line expression. Ctrl-R working would be nice too. I found several posts, git commits and issues related to this. Let me share what I found:
- Erlang has supported multi-line history since the OTP 26 shell updates. This works perfectly for me in Erlang, but doesn’t transfer over to Elixir like other shell improvements.
- José’s branch at GitHub - elixir-lang/elixir at jv-get-until-parser-26 works really well. It’s referenced in the “to be implemented when we exclusively support Erlang 27” section at Support Erlang/OTP 27 new features · Issue #12857 · elixir-lang/elixir · GitHub, though.
- The GitHub - nhpip/iex_history2: An improved history for the Elixir IEx shell project supports it today.
Given Elixir’s Erlang support policy, I’d expect Erlang 27 to be exclusively supported in 2026.
The iex_history2
project is pretty interesting, but has just enough friction to enable that I don’t expect myself to use it most of the time. This is not a criticism of the project, but just that it would be easier for me if IEx did this out of the box.
Since I mostly use Erlang 27 these days, I’m tempted to run a custom version of Elixir with the patch.
Is there another option that I missed?