Version: 1.3.1 (using KDE 3.2.1, (testing/unstable)) Compiler: gcc version 3.3.3 (Debian) OS: Linux (i686) release 2.6.4 I use terminals to read debugging output from another machine. Once I'm done with a debugging session I'd like to clear the whole konsole (terminal *and* history). It would be nice if there was a way to perform these 2 actions in one go. If that clutters the menu entries, a shortcut action of "Clear History & Terminal" would do just fine.
A shortcut may be possible; but it may not happen for a while (if every). Use this small script to do this; use an alias for easy usage. #!/bin/sh clear # Assuming only one konsole running KONSOLE=`dcop | grep konsole` SESSION=$(dcop $KONSOLE konsole currentSession) # or #SESSION=$(dcop $KONSOLE_DCOP currentSession) dcop $KONSOLE $SESSION clearHistory
hi there -- oddly, that script no longer seems to work, although the vars make sense when it's done through kdcop. I get: dcop 'DCOPRef(konsole-10158,konsole)' session-4 clearHistory no such function (that's the right DCOPRef and session object according to kdcop.) anyway -- I actually wanted to add this: it seems that "clear history" has been assigned an unofficial CSI sequence by XTerm in this change: http://cvsweb.xfree86.org/cvsweb/xc/programs/xterm/xterm.log.html?rev=1.57#xterm_107 the seq is ESC[3J . it's been in XTerm since 1999. it'd be really nifty if Konsole could support this...
This does work: dcop konsole-7804 session-1 clearHistory Your link is for XFree86's xterm which I don't use... As far as the control seq, look at ctrlseq.ms in the xterm package. http://dickey.his.com/xterm/xterm.faq.html
Fixed in KDE 4. Ctrl+Shift+X shortcut clears terminal and history.