SUMMARY When copying multi-line text and pasting it into the terminal, the new lines do not cause the commands in the text to be executed. STEPS TO REPRODUCE 1. Have a text editor with some commands that can be executed in the terminal, each on a line. 2. With the cursor at the beginning of the file, hold shift and move one line down, selecting the entire line, then copy it to the clipboard. 3. In Konsole paste the text. OBSERVED RESULT After the text is pasted, the cursor is moved to the beginning of the next line in the terminal, but the command is not executed and the command prompt is not shown until the user presses the physical ENTER key. EXPECTED RESULT The new line at the end of the text should execute the command, which should start immediately after pasting and at the end of the execution, a command prompt should be seen - no further user input should be needed. SOFTWARE/OS VERSIONS Linux/KDE Plasma: KDE Plasma Version: 5.23.80 KDE Frameworks Version: 5.87.0 Qt Version: 5.15.3 ADDITIONAL INFORMATION It used to work in the past. I'm not sure at which release it stopped working.
This is actually intentional. It prevents you from being tricked into accidentally executing malicious code copied from elsewhere that includes hidden characters and text due to font shenanigans.
Couldn't the issue of trickery be solved by a warning dialog to be shown when a user pastes text that contains a new line (with a "don't worry about it anymore" checkbox), like we get when pasting a large text box?
The user would most likely ignore it, as most users don't read dialogs. Having a "don't ask again" checkbox would also defeat the purpose of it, since you need to read the full text of every single paste to make sure it's safe.
(In reply to Nate Graham from comment #3) > The user would most likely ignore it, as most users don't read dialogs. Yea... make sense :-(
(In reply to Nate Graham from comment #1) > This is actually intentional. It prevents you from being tricked into > accidentally executing malicious code copied from elsewhere that includes > hidden characters and text due to font shenanigans. Would it be possible to add this feature as an option in Konsole settings, so the user can enable or disable it?
*** This bug has been marked as a duplicate of bug 431695 ***
If it is, please open a new bug report for that request, rather than re-opening an existing one.