Any Bash features you'd like to see?

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Wed May 11 20:52:11 UTC 2005


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?

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.

Lennart Sorensen
--
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