The following issue is reproducible in several terminals, e.g. xterm and GNOME Terminal, and several shells, e.g. bash and zsh.
1. From the shell in an X terminal emulator, run an X application in foreground, e.g. emacs-gtk or xterm. 2. Paste a long text (e.g. the contents of /usr/share/doc/libc6/copyright to choose an example every one has) in the terminal. Actually, only the beginning of the text appears in the terminal. 3. Type Ctrl-C (one or several times) in the terminal. But nothing happens. 4. Quit the X application that was started at step 1. Result: many lines of the pasted text are executed by the shell! This issue doesn't occur when the pasted text is short: the Ctrl-C kills the X application via a SIGINT and nothing is executed. You may wonder why one would paste a long text at step 2. In fact, this happens by accident: I sometimes paste data in the terminal instead of the application (typically Emacs). And this is really annoying, in particular when lines contains the ">" character, which has the effect to create files. Is there any way to avoid this issue? -- Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)