Any Bash features you'd like to see?

Peter plp-ysDPMY98cNQDDBjDh4tngg at public.gmane.org
Thu May 12 04:47:34 UTC 2005



On Wed, 11 May 2005, Lennart Sorensen wrote:

> On Wed, May 11, 2005 at 11:20:26PM +0300, Peter wrote:
>> Oh, that's a good one. One thing that I would really like is to have
>> .bash_history log commands from *all* open shells for a given user. I
>> often have 4-8 shells open and the history does not reflect what I was
>> doing in all of them. The easiest way would be for bash to stat and
>> count the links to bash_history on startup. If >1 open another
>> bash_history and write to it instead.
>
> Doesn't zsh already support that?

zsh is not the default system shell on linux.

> Besides all you have to do is make sure you remember what was in the
> history at start, then compare it with what you have now, and just
> append the new entries to the end of the file (rather than just take
> current history in memory and write to file, overwriting the old file).
>
> That way all the shells can append their new command to the history on
> exit.  It won't give a chronological history of course, but at least all
> your commands will be there.

That implies mutual locking to prevent writing garbage into the file, 
and a different format of the file (to id the writing shell - otherwise 
backtracking on a session set is impossible).

Peter
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list