>There are only a couple of ways to do this, so even though the mechanism >konsole uses is undocumented, we can try to figure it out. There are two >possibilities: inject a character into the input stream, or send a signal >to the foreground process group. I tested this. This is not some symbol in input stream (tested using "stty raw -echo; cat > /tmp/log"). And this is signal 28, i. e. SIGWINCH (on Debian GNU/Linux amd64, tested using small C program). Also, a small test C program, which uses readline (Debian version 6.2+dfsg-0.1) works as I expect.
So, yes, this is not bash+konsole bug, this is readline+konsole bug. >Since typing ^L at the prompt works, that's probably not what konsole uses. Yes, ^L works. Also, konsole 2.8.4 (upstream version, default in wheezy) (this is version I use) uses Ctrl-Shift-X as default shortcut for "Clear Scrollback and Reset" and konsole 2.14.2 (upstream version, default in sid as on today) uses Ctrl-Shift-K. >This would make sense if the two operations did the same thing. I don't >think they do; I think the Ctrl-Shift-X key sequence causes konsole to >send SIGWINCH. I still want Ctrl-Shift-X to work as in 4.2. ^_^ >There is a better explanation in one of the threads I referenced in my >previous message, but here's the short story: readline has always set >SIGWINCH to restart system calls. It would redraw the prompt upon receipt >of a SIGWINCH in previous versions because it (incorrectly) executed that >code in a signal handler context. Cleaning up the code so it didn't try >to execute arbitrary code in signal handlers was one of the big changes >between bash-4.2/readline-6.2 and bash-4.3/readline-6.3. So, is this possible to restore old behavior in bash-4.3/readline-6.3 preserving "clean" and "right" code? ATTENTION! Now I want to report some REAL BUG! When I change konsole size with some long text line typed in bash 4.2 buffer, text moves. With bash 4.3 it doesn't move. :) Yes, I know, nobody uses Ctrl-Shift-X except for me, so, you think this Ctrl-Shift-X-bug isn't worth fixing. But everybody resize his terminal window, so now I found real bug, ahaha! :) Reproduces using 4.3-11 from Debian and doesn't reproduce using 4.2+dfsg-0.1+deb7u3 from Debian. And thank you, Chet for the idea. :) == Askar Safin http://vk.com/safinaskar Kazan, Russia