Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
New tool for merging zsh history (Was: Merging extended history)
- X-seq: zsh-workers 53411
- From: Christoph Groth <christoph@xxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Cc: zsh-users@xxxxxxx
- Subject: New tool for merging zsh history (Was: Merging extended history)
- Date: Mon, 24 Mar 2025 18:15:06 +0100
- Archived-at: <https://zsh.org/workers/53411>
- Cancel-lock: sha1:OxD7V9f9c4kd59+7FvQvYqBqY4g=
- List-id: <zsh-workers.zsh.org>
- References: <87frjaf4bm.fsf@grothesque.org> <144968952.2165724.1742376444626@mail.virginmedia.com> <87sen8vzib.fsf_-_@grothesque.org> <20250320194812.GA5078@unser.net>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author