Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing commands in db after restart #113

Open
Shaked opened this issue Sep 19, 2021 · 1 comment
Open

Missing commands in db after restart #113

Shaked opened this issue Sep 19, 2021 · 1 comment

Comments

@Shaked
Copy link

Shaked commented Sep 19, 2021

Sometimes when I restart my mac, open termianl and lookup my zsh history, I can't find commands that used in my previous session before restarting.

╰─$ zsh --version                                                                                                                                                                        [Sat Sep 18 01:22:58 2021] 130 ↵
zsh 5.8 (x86_64-apple-darwin19.6.0)

 ~/.oh-my-zsh/custom/plugins/zsh-histdb ‹master›
╰─$ git log -n 1

commit 5d492b4d0e2638588b1520f0ff0d768c729f6565 (HEAD -> master, origin/master, origin/HEAD)
Merge: 6aea89f c16ad55

Any idea why this happens? Am I missing something?

Thank you

@larkery
Copy link
Owner

larkery commented Oct 8, 2021

I am not sure - I haven't experienced this. The only reasonable explanation I can think of is that the sqlite process which writes the history is being terminated before it manages to commit all the changes it's made.

Or something else is fiddling with your history database file.

If it is the first thing I would suggest looking into how you can control when sqlite commits changes to the database on disk. I don't know a lot about this, because I haven't encountered this problem, but maybe there is either a pragma you could issue or some command line arg to get it to write stuff down more frequently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants