On Thu, Nov 6, 2014 at 3:28 AM, Chet Ramey <chet.ra...@case.edu> wrote: > > In theory, one could change the functions in history.c and histfile.c to > change the in-memory history list to one that uses a file, possibly with > mmap(). > I'd be happy to look at contributed code to do this [..]
would you accept a solution like this: 1. all running instances of bash with history support on, share history via shmem segment (some care as to its size should be taken) 2. $HISTFILE in every bash points to history file where every bash writes history in chronological (depending on settings) order 3. $HISTFILE is only read on startup, if there are no other bash instances running 4. sharing of history and synchronisation between instances is realised via standard ipc I have no idea how zsh does it, maybe it should be checked first. cheers, pg