New tool for merging zsh history (Was: Merging extended history)

Christoph Groth <[email protected]>
Newsgroups gmane.comp.shells.zsh.devel,gmane.comp.shells.zsh.user
Message-ID <[email protected]>
Juergen Christoffel wrote:

> On Thu, Mar 20, 2025 at 10:10:20AM +0100, Christoph Groth wrote:
> >
> >The merging tool will allow me to sync histories across boxes (using
> >unison in my case).  I’m a bit puzzled that no one seems to have
> >developed such a tool so far!
>
> Interesting idea, never thought about that.

Thanks.  It took a while, but here’s a new tool for three-way-merging
zsh history files with automatic conflict resolution:

https://git.grothesque.org/zsh_history/about/

It’s totally over-engineered ;-) ... but should get the job done
robustly at lightning speed.

I hope that someone will find it useful.

> I guess it depends on ones needs. As I always have a bunch of
> (dedicated) terminal windows open, I simply generate history files per
> shell / level ...
>
>   export HISTFILE=$HOME/.history/${TTY##*/}.$SHLVL

I already setopt SHARE_HISTORY to share history across terminals on the
same machine.

> ... and if I need to retrieve a command on another machine, grep is my
> friend.

Sure, that’s what I’ve been doing so far as well.

Christoph
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.