Bug 125222

Summary: konsole history not cleaned completely
Product: [Applications] konsole Reporter: gsasha
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED NOT A BUG    
Severity: normal    
Priority: NOR    
Version: 1.6.2   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description gsasha 2006-04-09 13:45:30 UTC
Version:           1.6.2 (using KDE 3.5.2, Kubuntu Package 4:3.5.2-0ubuntu1 dapper)
Compiler:          Target: i486-linux-gnu
OS:                Linux (i686) release 2.6.15-20-686

On my machine, the "Clear History" action is bound to Ctrl+Shift+L.
There are some very strange effects when I activate it.

If I press Ctrl+Shift+L, and then Ctrl+L, some of the (supposedly deleted) history shows up!
On the other hand, just Ctrl+Shift+L does not clean the current window contents.

So, it appears like there is no way for me to clean up the history completely.

If this is a feature, not a bug, I think it'd be a good idea to have a "Clear History completely" action - which is what most people mean when they ask to "Clear History".
Comment 1 Thiago Macieira 2006-04-11 09:06:44 UTC
No bug. Clear history doesn't delete the current screen (who knows what you have on your screen?). Ctrl+L is not a Konsole shortcut.

Your shell does a redraw, which means it adds stuff to the Konsole history. So, you DID clear the history, but you've just added stuff again.
Comment 2 gsasha 2006-04-11 22:40:20 UTC
This used to work correctly with some older versions of KDE (around 3.1 
IIRC). I'm not sure it's a bug with Konsole, maybe it's a problem with 
curses...

I did a check of the gnome-terminal behavior in this regard. It works 
like this:
- if I just press Ctrl-L, it indeed appears to draw one more screenful 
of empty text, increasing the history size.
- however, if I select a "Reset and Clear" option (which clears 
everything including the prompt), and then press a Ctrl+L, the prompt 
reappears on the top of the screen and the history is empty.

I'm not sure about what's the best way to achieve the desired behavior 
of history clearing, but it's obvious that it should work like following:

If I am running a new command and want to concentrate on its output, I 
need the screen history to include *only that command* (and what else 
would I clean the history for?). To this end, I need all the history of 
previous commands to be gone. Preferably, I'd achieve the history 
cleaning with just one key combination (like Ctrl+Shift+L), but two are 
OK as well.

The problem is, currently there is no way at all to get a clear history.
Comment 3 Thiago Macieira 2006-04-11 23:07:16 UTC
Ctrl+L then Ctrl+Shift+L
Comment 4 gsasha 2006-04-12 00:47:44 UTC
Thiago Macieira wrote:
[bugs.kde.org quoted mail]
OK