2

Yesterday I updated to Ubuntu 21.04. This is basically the same issue as this post. I solved the original issue (using this answer) of having the text highlighted when I paste something into the terminal by adding bind 'set enable-bracketed-paste off' to my ~/.bashrc.

However, I used R interactively from the terminal and when I paste something into the terminal, the same issue of highlighting the text appears. Even more annoying, if I paste multiple lines in then only the first one executes and the remaining lines are left 'piled up' (the line with assign(c_list[1]....). This means I have to hit enter twice before I can enter anything into the terminal.

This never used to happen before the update - does anyone know a fix?

enter image description here

user438383
  • 79
  • 2
  • 15
  • I wonder if [this other workaround](https://askubuntu.com/a/1338768/100356) I had posted on my Gnome Terminal question would help you in this case? – Enterprise Jun 04 '21 at 14:16
  • Thanks I will try this - but I suspect if you are changing the highlight colour it won't change the fact that the pasted lines 'pile up' (like in the image), meaning you have to hit enter twice for every line? – user438383 Jun 04 '21 at 14:22
  • @user438383 using 20.04 LTS maybe safer to prevent such unpredictable behaviours... – N0rbert Jun 04 '21 at 14:46
  • The last command should not "hang". All commands are consecutively executed once you press Enter after having pasted, even if you do not copy the "enter" of the last line along. That it hangs for you may be a specific issue with your command. The behavior has changed in a sense that what you paste is not immediately interpreted line by line - it only is when you "confirm" by pressing enter. – vanadium Jun 04 '21 at 16:03

1 Answers1

1

The second more annoying problem looks like the 'enable-bracketed-paste On' option enabled by default in bash 5.1. To revert to the old behaviour create or edit .inputrc (in home dir) adding the line

set enable-bracketed-paste Off
simon wood
  • 11
  • 1