Ctrl+R bug in erl?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Ctrl+R bug in erl?

Roger Lipscombe-2
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.
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Ctrl+R bug in erl?

Gerhard Lazu
OTP v21.3.5 on macOS Mojave 10.14.4 works as expected for me:

Erlang/OTP 21 [erts-10.3.4] [source] [64-bit] [smp:20:20] [ds:20:20:10] [async-threads:1] [hipe] [dtrace]

Eshell V10.3.4  (abort with ^G)
1> 42+42.
84
(search)`': 42+42.
2> 42+42.
84

Have you tried a different machine?

On Fri, Apr 26, 2019 at 5:50 PM Roger Lipscombe <[hidden email]> 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.
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Ctrl+R bug in erl?

Roger Lipscombe-2
On Fri, 26 Apr 2019 at 17:56, Gerhard Lazu <[hidden email]> wrote:
> (search)`': 42+42.

At this point, what did you press? Don't enter any text. Just press
Backspace a bunch of times. I get another copy of the previous history
line appended each time.
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Ctrl+R bug in erl?

Hugo Mills-2
In reply to this post by Roger Lipscombe-2
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. 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).

   Hugo.

--
Hugo Mills             | Purrmetheus stole fur from the Dogs, and was chained
hugo@... carfax.org.uk | up for beagles to eat his liver.
http://carfax.org.uk/  |
PGP: E2AB1DE4          |                                         Rich and Hugo

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions

signature.asc (853 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Ctrl+R bug in erl?

Gerhard Lazu
In reply to this post by Roger Lipscombe-2
You are right. I tried again and can confirm the same behaviour as you reported - every backspace repeats the previous command:

erl
Erlang/OTP 21 [erts-10.3.4] [source] [64-bit] [smp:20:20] [ds:20:20:10] [async-threads:1] [hipe] [dtrace]

Eshell V10.3.4  (abort with ^G)
1> 42+42.
84
(search)`': 42+42.42+42.42+42.42+42.42+42.42+42.42+42.

Just upgraded to 21.3.6 and still seeing the same incorrect behaviour.

On Fri, Apr 26, 2019 at 6:04 PM Roger Lipscombe <[hidden email]> wrote:
On Fri, 26 Apr 2019 at 17:56, Gerhard Lazu <[hidden email]> wrote:
> (search)`': 42+42.

At this point, what did you press? Don't enter any text. Just press
Backspace a bunch of times. I get another copy of the previous history
line appended each time.

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Ctrl+R bug in erl?

Dave Cottlehuber-5
In reply to this post by Hugo Mills-2
On Fri, 26 Apr 2019, at 19:05, 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. It's probably some peculiarity of the termcap
On FreeBSD 12.0 All using the same system  readline I get weirdness on OTP21 and 22 but not OTP19 or OTP20 erts  9.3.3.10. This bug seems rather cosmetic. More like an erts change than a readline or termcap thing?

  Dave Cottlehuber
 







_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Ctrl+R bug in erl?

Per Hedeland
In reply to this post by Hugo Mills-2
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
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions