Command history on custom CLI not working with OTP 26, but was with OTP 25

Hi,

Elixir version. 1.16.3
OTP Version: 26.2.5

I have a custom CLI that is no longer working after upgrading to OTP 26. The up arrow that gets the previous commands does not work anymore.

I have created a slimmed down version of my custom CLI to show and reproduce the problem: alanj853/cli_test: Test repo for reproducing problems with OTP 26 (github.com)

Here are the steps (they are also in the readme of that repo):

  1. Clone this repo and run install the following elixir and erlang versions using asdf
asdf install erlang 25.3.2
asdf install erlang 26.2.5
asdf install elixir 1.16.3-otp-25
asdf install elixir 1.16.3-otp-26
  1. First try with OTP 25.
asdf local erlang 25.3.2
asdf local elixir 1.16.3-otp-25
  1. Run “iex -S mix” This should launch you into the custom CLI
  2. Type the command “hello” You should get response “world”
  3. Now press the up arrow on the keyboard to get the “hello” command again

Expected result: “hello” command should come up on the prompt

Actual result: On OTP 25, the up arrow does as expected:

Welcome to the CLI
myprompt> hello
world
myprompt> hello
world
myprompt>
  1. Now try with OTP 26
asdf local erlang 26.2.5
asdf local elixir 1.16.3-otp-26
  1. Run “iex -S mix” This should launch you into the custom CLI
  2. Type the command “hello” You should get response “world”
  3. Now press the up arrow on the keyboard to get the “hello” command again

Expected result: “hello” command should come up on the prompt

Actual result: On OTP 26, the up arrow seemingly does nothing

Welcome to the CLI
myprompt> hello
world
myprompt>

Issue resolved here: Command history on custom Elixir CLI not working with OTP 26, but was with OTP 25 - #3 by alanj853 - Questions / Help - Erlang Programming Language Forum - Erlang Forums

1 Like