3 ms·
> a terminal will default to interpreting what you pasted the same as entering a sequence of commands Another reason why urxvt[1] is the best terminal emulator
by pdkl95 8y ago
> a terminal will default to interpreting what you pasted the same as entering a sequence of commands
Another reason why urxvt[1] is the best terminal emulator: the "confirm-paste"[2] extension. Any time the terminal receives a paste matching /[\n\r]/, the terminal shows you the incoming text in an overlay and asks for confirmation.
Enable it with the option "-pe confirm-paste" or add something like this to ~/.Xresources
URxvt*perl-ext-common: default,confirm-paste
(or added to your list of extensions, if you are not using the "default" set)
(afterwords, don't forget to run "xrdb -merge ~/.Xresources")
[1] http://software.schmorp.de/pkg/rxvt-unicode.html http://software.schmorp.de/pkg/rxvt-unicode.html
[2] http://cvs.schmorp.de/rxvt-unicode/src/perl/confirm-paste?view=markup http://cvs.schmorp.de/rxvt-unicode/src/perl/confirm-paste?vi...
- jwilk 8y agoThe confirm-paste plugin won't necessarily save you from malicious pastes. See my comments in https://lwn.net/Articles/749992/ https://lwn.net/Articles/749992/ .
- pdkl95 8y agoThanks, I will have to fix that, probably by trapping any non-printing, non-whitespace code, not just [\n\r]. I can't think of any situation I would not want to confirm past of text containing control codes, so it should be an easy fix. Incidentally, while I wasn't vulnerable to C-o because I have a lot of remapped bindings. However, I am vulnerable to the two other codes that I bound to operate-and-get-next. > Enumerating badness usually doesn't end well. *applause* I wish more people that create and/or operate networked devices understood that.