hanslub42 / rlwrap

A readline wrapper
GNU General Public License v2.0
2.59k stars 151 forks source link

rlwrap -a bc duplicates the line to the right #175

Closed Kamilcuk closed 1 year ago

Kamilcuk commented 1 year ago

I was using rlwrap -a bc for quite some time. For a few months I am experiencing the following issue where the line is "reprinted" to the right. In the following GIF I am pressing 2.2*2.2<enter><key up><enter>. You can see an additional .2*2.2 printed to the right after pressing enter:

Peek 2023-02-08 20-15

@edit Surprisingly this seems to be locale dependent. I am able to reproduce with env -i LC_ALL=en_US.UTF-8 HOME=$HOME TERM=$TERM rlwrap -a bc but not with env -i LC_ALL=C HOME=$HOME TERM=$TERM rlwrap -a bc. I will add LC_ALL=C to my bc wrapper as a workaround.

hanslub42 commented 1 year ago

This is almost certainly a duplicate of #168 See also https://github.com/hanslub42/rlwrap/issues/108#issuecomment-1400732430

If you can live without bracketed paste, the easiest workaround would be to put set enable-bracketed-paste off in your .inputrc. Otherwise, upgrade to the newest readline and rlwrap