With fedora 34, pasting a bash command in xterm does not run the command

After updating from fedora33 to fedora34, pasting a bash command
in xterm no longer runs the command.

In order to run the command, the Enter key must be pressed.

In fedora33, the end of the pasted command caused the command to run.

Running stty -a shows identical results for fedora33 and fedora34.

I run fedora using FVWM (Gnome is not used).

I’ve noticed this behavior as well. I don’t like it either. I don’t know where to turn it off.

I would not WANT bash to execute the command just because I pasted it into the terminal. I want full control of when and how commands are executed, and often I use pasting a command followed by other segments of text related to how it is to be executed or as part of a string of commands I am building. Having the command execute as soon as it is pasted into the terminal would be at times foolhardy, especially if you were doing it as root.

Just as an FYI:
If you paste a command in when the paste includes the newline, like you can get from a terminal line or from copying from a web page for example, the command will execute.

3 Likes

This is bracketed paste mode, which was turned on by default in bash 5.1.
See, e.g., Chris's Wiki :: blog/unix/BashBracketedPasteChange
You can turn it off (see above), but you may wish to read the security concerns in the comments.

3 Likes