[erlang-questions] Ctrl+R bug in erl?

Per Hedeland per@REDACTED
Fri Apr 26 19:22:02 CEST 2019


On 2019-04-26 19:04, Hugo Mills wrote:
> On Fri, Apr 26, 2019 at 05:49:39PM +0100, Roger Lipscombe wrote:
>> Steps to reproduce (in OTP-21.0):
>>
>> 1. Run 'erl'.
>> 2. Evaluate an expression, so there's something in the history.
>> 3. Press Ctrl+R to bring up reverse search.
>> 4. At the (search) prompt, press Backspace.
>> 5. Weirdness ensues.
>>
>> Erlang/OTP 21 [erts-10.0] [source] [64-bit] [smp:12:12] [ds:12:12:10]
>> [async-threads:1] [hipe]
>>
>> Eshell V10.0  (abort with ^G)
>> 1> 42 + 42.
>> 84
>> (search)`': 42 + 42.42 + 42.42 + 42.42 + 42.42 + 42.
> 
>     I get this, too. I'm on Debian, with their packaged version of
> 21.2.2.

Me too, on FreeBSD, with 21.2 built from source.

> It's probably some peculiarity of the termcap (and hence is
> only fixable by a midnight sacrifice of an aubergine, performed by a
> team consisting of three holy fools, two consecrated priestesses, and
> a virgin unicylist).

:-) Well, it's definitely something related to that, i.e. the
resulting display is wrong - but my guess is that it's not a problem
with termcap but with how the Erlang shell interprets it (or not). But
anyway, in many(/most?) "terminal editing sessions", Ctrl-L will clean
up the mess and tell you what the current state of affairs is.
Unfortunately it also drops you out of search mode.

Of course, you can also just refrain from hitting "backspace" when you
don't actually have anything to delete...

--Per Hedeland



More information about the erlang-questions mailing list