Why iex's "ctrl-h" have different behaviour on different platform

I’m using elixir on macos and linux(arch BTW). Both installed from brew and pacman, respectively, and have version 1.15.6. But finding the readline mode of has different behaviour, which I’ll explain:

With following line in iex:


Note that the “|” character respresents the cursor position. In macos, after type “ctrl-h”, I got:


It works as expected, detele one character before cursor, while in linux:


Seems like the “ctrl-h” has the same behaviour as “ctrl-w” in linux. In daily use, I need to switch from linux and macos very often, and this inconsistent behaviour on different platform annoys me a lot. I’ve checked the doc of iex, but found nothing helpful.

Not sure if it’s the same root cause, but there’s another Arch user experiencing a similar symptom:

Seems nope, “backspace” work as expedted on my machine

Peculiar; many terminals send Control-H when the backspace key is pressed :thinking:

I use wezterm in both platform, and the “ctrl-h” works ok in zsh, bash, and ipython.

Which version of Erlang are you using? If 26.1, can you try with 26.0 and see if that fixes the problem? and if it doesn’t, please try any 25.x version and see if that fixes anything.

1 Like