Bug 52806

Summary: all shells are restored with same command history
Product: [Applications] konsole Reporter: Jonathan Alze <ehud.barak>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED NOT A BUG    
Severity: wishlist CC: bugs_kde_kkr1a2, shea
Priority: NOR    
Version: 1.2   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Jonathan Alze 2003-01-09 19:04:16 UTC
Version:           1.2 (using KDE KDE 3.0.99)
Installed from:    Compiled From Sources
Compiler:          gcc 3.2 
OS:          Linux

When you exit from kde and leave konsole open, it is restored in the next kde session. If you use several shells in on Konsole-window, all of them are restored (and start even in the directory where you have been before, which is very nice).

However, with the current release ALL shells are restored with the same command history, namely that one of the last shell.

I would mark this rather a wishlist item than a bug, but as I remember that this feature (saving and restoring several sessions including command history) has worked already with the last version that I have used before (kde3.1-rc3).
Comment 1 Stephan Binner 2003-01-12 15:08:06 UTC
It worked before!? This can't be because there was AFAIR never code to set 
HISTFILE. 
Comment 2 Gary Shea 2003-03-03 19:47:34 UTC
I found this 'bug' report while trying to solve the same problem.  I use tcsh which reads  
the history late enough that all I need is a general purpose env-variable that identifies  
the window -- the rest can happen in the .tcshrc file.  As far as I know, tcsh doesn't use 
HISTFILE (as an env-variable anyway... it uses a shell variable called 'histfile'), but I 
could make use of it if it was available.  I'd be happy to do this myself, if the 
env-variable approach is ok. 
Comment 3 Kurt Hindenburg 2005-03-22 07:49:31 UTC
I agree this is annoying.  However, the fix seems like it would be difficult to say the least.  Each shell does the history differently...
Comment 4 Mark 2005-08-06 20:39:38 UTC
I think this is an upstream issue: the shell developers should have done that long before: when starting a shell, just give it a "context tag" or something alike. One could even try to persuade the shell developers to add a "store environment hook" in order to restore the session _completely_ (incl. variables but, of course, without running programs...)
Comment 5 Thiago Macieira 2005-08-08 05:57:16 UTC
Upstream problem for sure.

When all the shells agree on a "context" tag as you put it, reopen this.
Comment 6 gsasha 2005-08-16 19:16:46 UTC
I don't understand your approach guys.

Ok, there is HISTFILE environment variable, available in BASH and probably in some other shells. So, why, instead of waiting passively for all the shells to agree on a single history mechanism, can't the Konsole make use of this variable as-is?

First, it will make the command histories immediately usable at least for the BASH users.

Second, it will provide an incentive to the shell maintainers to implement support for this feature as well.

I believe a more active approach here would be beneficial...