history in konsole tabs: where?

Scott Bicknell scotbicknel at cox.net
Thu Oct 11 17:43:04 BST 2007


On Thursday, October 11, 2007 7:52:52 am Dexter Filmore wrote:
> On Saturday 06 October 2007 17:50:24 Kevin Krammer wrote:
> > > Where does Konsole store the history for multiple tabs?
> > > I can find the first tab's history in ~/.bash_history and
> > > even in other tabs $HISTFILE is set to that but commands
> > > in other tabs don't seem to go there, yet "history"
> > > displays them accurately.
> >
> > It is up to the shell when it writes or reads its history
> > file.
> >
> > E.g bash usually doesn't read it during its lifetime, zsh
> > reads it when you press enter without a command
>
> That wasn't my point.
> I need to know where *konsole* stores the history for each
> tab. It has to be doing that since each tab has its own
> history but the commands from the tabs do not show up in the
> file ~/.bash_history.

As someone already pointed out, bash stores the history in RAM 
until it exits, but you can influence this behavior by placing 
the following in your .bashrc file:

shopt -s histappend
export PROMPT_COMMAND='history -s'

This will force bash to append the history to the .bash_history 
file and to update it whenever it displays a new prompt. This 
will synchronize the history among all of your tabs in konsole.
-- 
Scott
___________________________________________________
This message is from the kde mailing list.
Account management:  https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.




More information about the kde mailing list