This is my personal website, built using Jekyll.
I'm using GitHub Pages built-in support for the Jekyll engine to render my content dynamically as I push to this repo.
An oh-my-zsh plugin for GPG encrypted internet synchronised Zsh history, with Git.
Home Page: https://www.wulfgar.pro/synchronising-zsh-history-over-the-internet-with-oh-my-zsh-and-history-sync/
License: MIT License
This is my personal website, built using Jekyll.
I'm using GitHub Pages built-in support for the Jekyll engine to render my content dynamically as I push to this repo.
I got the following error when committing:
fatal: bad boolean config value 'null' for 'commit.gpgsign'
I think this might be due to the fact that the .gitconfig file is being modified by another tool such as Gitkraken.
As it adds the following lines:
[gpg]
program = null
[commit]
gpgSign = null
[tag]
forceSignAnnotated = null
When commented the error goes away and I can commit again.
Is there a way to ignore this lines from the history-sync perspective?
zhpl
/Users/xxx/.zsh_history -> /Users/xxx/.zsh_history.backup
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 3 (delta 1), reused 3 (delta 1), pack-reused 0
Unpacking objects: 100% (3/3), 98.79 KiB | 232.00 KiB/s, done.
From github.com:metroruby/history-sync
5dead8b..46a5841 main -> origin/main
Updating 5dead8b..46a5841
Fast-forward
zsh_history | 4083 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------------------------------
1 file changed, 2042 insertions(+), 2041 deletions(-)
gpg: encrypted with rsa4096 key, ID AA0A2C81956100E1, created 2022-06-06
"history sync [email protected]"
gpg: Signature made Tue Jun 7 09:12:49 2022 +07
gpg: using RSA key 6922AD2C317465B1DAD1BE97A33E98A21AB609AF
gpg: Good signature from "history sync [email protected]" [ultimate]
sed: 1: ":a;N;$!ba;s/\n/ qkTk6f8 ...": unused label 'a;N;$!ba;s/\n/ qkTk6f8AyWECSK5kPLklo9ff30xnnZOC /g'
sed: 1: ":a;N;$!ba;s/\n/ qkTk6f8 ...": unused label 'a;N;$!ba;s/\n/ qkTk6f8AyWECSK5kPLklo9ff30xnnZOC /g'
sed: isarutle/.zsh_history: No such file or directory
I run zhps
is done. but run zhpl
is error that the above information.
Please suggest.
thanks.
Add tests that verify history-sync. Ensure these tests execute in CI for PRs.
It's unclear to me how this chooses which gpg key to use as the documentation doesn't mention that.
I used this as a supplement https://medium.com/@jonas.elan/keeping-zsh-history-synchronized-across-multiple-environments-f1922fdef275
zhps
works
zhpl
throws
Already up to date.
gpg: encrypted with 2048-bit RSA key, ID ABC, created 2020-01-30
"name <[email protected]>"
gpg: Signature made Thu Jan 30 12:55:16 2020 PST
gpg: using RSA key XYZ
gpg: Good signature from "name <[email protected]>" [ultimate]
sort: Illegal byte sequence
Currently tool removes newline from multiline commands.
Example:
Before zhsync:
: 1511025426:0; echo command1\
echo command2
After zhsync it will become:
: 1511025426:0; echo command1\echo command2
This looks absolutely amazing thanks so much.
I'm doing a lot of work inside Containers where I'm constantly thinking "what was that command I ran in X environment?"
I just installed using antidote
, setting up the repo
for my history and a gpg
is my next step, but before I do...
A quick question though, and seeking clarification on the docs, specifically about the zhsync
command as I couldn't tell in README.md
or zhsync --help
....
"Do I need to run zhsync
as a cli command manually periodically? Or is it a background service/daemon that I start and stop?
If the prior, any suggestions on me running it as a service? If I have to do it manually I will probably forget, or the container I want to sync will be stopped or deleted when I need to sync.
thanks again for all your ๐
Hi, is there an easy way to prevent having to add "-r [my_name]" each time?
Thanks for a great plugin!
When I do a zhpl I get the following -
gpg: encrypted with rsa4096 key, ID xxxx, created 2020-02-25
"xxxx"
gpg: Signature made Thu 23 Mar 15:19:25 2023 GMT
gpg: using RSA key xxxxx
gpg: Good signature from "xxxxx" [ultimate]
sed: 1: ":a;N;$!ba;s/\n/ pVeiz0P ...": unused label 'a;N;$!ba;s/\n/ pVeiz0PnBeyWcAN8UmndM4lv1ggDdWDb /g'
sed: 1: ":a;N;$!ba;s/\n/ pVeiz0P ...": unused label 'a;N;$!ba;s/\n/ pVeiz0PnBeyWcAN8UmndM4lv1ggDdWDb /g'
sed: RE error: illegal byte sequence
sed: 1: "/Users/xxx/.zsh_history": extra characters at the end of p command
Currently tool breaks multiline commands. Example:
Before zhsync
:
: 1475279111:0;vi
: 1475279824:0;mkdir tmprepo\
cd tmprepo\
touch file.txt
: 1475279852:0;ls
After zhsync
will become
: 1475279111:0;vi
: 1475279824:0;mkdir tmprepo\
: 1475279852:0;ls
cd tmprepo\
touch file.txt
See - command 1475279824 is broken
Fix: replace sort -u
with something that will respect multiline commands:
https://github.com/wulfgarpro/history-sync/blob/master/history-sync.plugin.zsh#L56
Not bash specialist, but I think something like this can help
The usage function exists; it's not available for use from the CLI
A github.io page would be good with a screen-cast
Hey, Will history-sync
push the whole history file and append history at the end of other machine's history file or another strategy implemented?
zhpl
/Users/yeochinyi/.zsh_history -> /Users/yeochinyi/.zsh_history.backup
Already up to date.
gpg: encrypted with rsa4096 key, ID DD238E35FB755FD1, created 2022-07-21
"Chris Yeo [email protected]"
gpg: Signature made Thu Jul 21 20:55:20 2022 +08
gpg: using RSA key 618331508297A026D8FE87730D0C5A4A2BBC62D8
gpg: Good signature from "Chris Yeo [email protected]" [ultimate]
sed: 1: ":a;N;$!ba;s/\n/ n7dC1gz ...": unused label 'a;N;$!ba;s/\n/ n7dC1gzxa36v5vpfvhW7mgfcxxf7lDnm /g'
sed: 1: ":a;N;$!ba;s/\n/ n7dC1gz ...": unused label 'a;N;$!ba;s/\n/ n7dC1gzxa36v5vpfvhW7mgfcxxf7lDnm /g'
sed: 1: "/Users/yeochinyi/.zsh_h ...": unterminated transform source string
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.