Giter VIP home page Giter VIP logo

history-sync's Introduction

history-sync's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

history-sync's Issues

Error when committing

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?

run zhpl show message 'No such file or directory'

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

Add tests that verify history-sync. Ensure these tests execute in CI for PRs.

zhpl `sort: Illegal byte sequence`

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

Seeking clarification on `zhsync`

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 ๐Ÿ‘

Error on pull

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

Support for multiline commands

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

Pushing strategy

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?

Error msg running with M1 OSX

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.