Konsole mouse triple-click trailing newline drives me ...
Hello there,
My problem is about usability of Konsole (a linux terminal emulator, v. 16.12.3 under gnome 3.22.3): the triple-mouse-click copy of text. I often triple-click with mouse on a line of Konsole's output with the intend to copy it and later paste it (possibly at the command line of another Konsole). However, there is a last newline in that copied text (which I guess is right there in the terminal's output, no dispute about that) which also gets into the copied text. In effect mouse triple-click copies into buffer the whole line PLUS a newline at the end. Nothing wrong with that except when I later paste the text on a terminal emulator, at the command line, that last newline snickily acts as a 'press enter' and automatically sends the whole pasted text to the shell for processing it without ME hitting Enter but the paster! I don't say this is not expected behaviour or a bug. But it can surely lead to evil exploits... Consider copying 'rm -rf /' in order to paste it into another command line *but modify* it before pressing Enter and execute it, e.g. 'rm -rf /tmp/*.log' and Konsole's paste action hits that Enter before modification... A scenario which can happen to a new user (and any user when dealing with complex/cryptic commands) when copy-pasting from a README file etc. (Thankfully it does not happen when triple-clicking from Firefox onto Konsole!). I would like to know whether there is an option to remove THE LAST TRAILING NEWLINE (or other spaces) from the text via the mouse triple-click action. (There is no need to remove all newlines - that will cripple it because in that case obviously someone is copying some text like a poem or something. Just the last one). FYI: Konsole's preferences under Mouse tab has 'Trim trailing spaces' tick-box but that does absolutely nothing either on literal trailing spaces or trailing newlines. Unless I am doing something wrong? FYI2: iTerm on Mac OSX behaves sensibly in the sense that it does not need to be told to remove trailing newlines from copy-paste - it does it by default. I would urge Konsole's or Terminal's developers/designers to have a look at iTerm and a lot of other OSX programs which in term of human-computer-interaction are champions. As a general suggestion: Copy-paste is crucial. We need more complexity to the logic of it. We need many levels (e.g. like the double/triple clicking) of it, each level copying a certain part of the text. best wishes to all open-source developers and thanks for Linux (can't live or earn my bread without it!), a. |
Check the option in "edit current profile" -> Mouse-> "Trim trailing spaces"
I like this behaviour, because every time I see it, it reminds me of the dangers of copying commands. |
serafean,
I ticked that box as I mentioned in my post but nothing changes. thanks, |
In that case : https://bugs.kde.org/
|
Some more triple-click woes
Once I am at it, and always in the context of Konsole,
I also have to note the inconsistent behaviour between copying (by mouse triple-click) a line from the output of 'more' and copying in exactly the same way from the output of 'head', 'cat'. % more filename.txt Then copying one line of text from the above command will stop at the end of the window (and not at the end of the actual line) However, with % cat filename.txt triple-click on any line will copy till the end of the line (as it appears in the 'filename.txt') ignoring where the line breaks because of window width (as it should be). Must have to do with this programs using additional newline signifiers? This behaviour I think also happens in other terminal emulators, but can't be sure which. Want to do good in the open-source? Fix these little daily nuances rather than inventing the new gnome behemoths and breaking our nerves with, for example, 'the terminal is ready'!!!! a. |
the terminal is ready?
never seen that. but, fwiw, this behavior is not specific to konsole; my urxvt has the same triple-click behavior: select the full line, incl. trailing newline. ...and can be changed with a commandline option and/or resource :D |
" ...and can be changed with a commandline option and/or resource "
any pointers please? this could be the solution to my problem. "... terminal is ready" i guess it is 'the window is ready' (already there is a remover https://extensions.gnome.org/extensi...ation-remover/ just like with the B.Gates' enterprise). |
Quote:
Quote:
Quote:
quo vadis, gnome? :rolleyes: |
All times are GMT -5. The time now is 05:08 AM. |