screen-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: workaround to not overwrite .bash_history


From: cga2000
Subject: Re: workaround to not overwrite .bash_history
Date: Wed, 14 Jun 2006 01:54:10 -0400
User-agent: Mutt/1.5.6+20040907i

On Tue, Jun 13, 2006 at 06:52:57PM EDT, Aaron Griffin wrote:
> You might be able to get by with something like:
> 
> export PROMPT_COMMAND="history -a $HISTFILE"
> 
this appends the current session's history list to the history file.
Since the OP wants to share the history across sessions I assume this
includes sessions that are already running?

In that case he would also need to do a "history -n".

I don't know if the PROMPT_COMMAND supports more than one command - and
it's a bit late to test. :-) 

But he could probably define a bash function something like:

shrhist ()
{
        history -a $HISTFILE
        history -n $HISTFILE
}

.. thus keeping his history lists & history file in sync' ..?

Thanks,

cga
> 
> _______________________________________________
> screen-users mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/screen-users




reply via email to

[Prev in Thread] Current Thread [Next in Thread]