thestinger / termite

Termite is obsoleted by Alacritty. Termite was a keyboard-centric VTE-based terminal, aimed at use within a window manager with tiling and/or tabbing support.
https://github.com/alacritty/alacritty
2.74k stars 241 forks source link

Add unsafe paste warning #759

Closed norpol closed 3 years ago

norpol commented 3 years ago

It would be amazing if termite would warn in case you're trying to paste mutli-line strings and preview the text somehow. This way there would be protection against accidentally pasting dangerous code and it would also avoid accidentally pasting something that hits enter.

xfce4-terminal added this feature some time ago.

Screenshot of unsafe paste demo, asking you in a dialog if you want to paste multiple lines and a preview of the text

laur89 commented 3 years ago

Shouldn't this be shell-dependent? Eg with bash/readline, you can add this to inputrc:

set enable-bracketed-paste on

This would disable auto-executing commands with newline in the end

norpol commented 3 years ago

Thank you, that is a good pointer - though I believe the terminal emulator should help with such a thing since you don't always all shells configured/configurable everywhere (e.g. ssh).

thestinger commented 3 years ago

Termite is obsolete. Please use Alacritty instead. See https://github.com/thestinger/termite#termite-is-obsoleted-by-alacritty for more details.

norpol commented 3 years ago

Thanks for the great time with Termite so far!