“Why doesn’t Oh-My-Zsh have a plugin that allows me to synchronise my Zsh history over the Internet?”
In the project’s 200+ plugin base, not one plugin achieves said functionality, and that’s why I coded history-sync.
The basic concept is:
- Encrypt
$HOME/.zsh_history
aszsh_history
using GPG public key encryption on the source computer - Push encrypted
zsh_history
to a remote Git repository - Pull encrypted
zsh_history
from said Git repository and decrypt on the destination computer - Merge decrypted
zsh_history
with$HOME/.zsh_history
on destination computer
All of this is achievable using history-sync’s alias commands:
zhps -r <string> -r <string> -r ...
zhpl
zhsync
See the project’s README.md for more detail.