-
-
Notifications
You must be signed in to change notification settings - Fork 564
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
[Bug]: Atuin seems to randomly "forget" lots of history also strange fuzzy search behavior. #2375
Comments
I ran ❯ atuin import auto
Atuin
======================
🌍
🐘🐘🐘🐘
🐢
======================
Importing history...
Detected ZSH
Importing history from zsh
██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ 11273/11273Import complete!
❯ atuin sync
Uploading 5 records to 0190c3daa0ed7c53933dd5eaeb013b8f/history
[00:00:00] [####################################################################################################################################################################################################################] 5/5 (0.0s)6/0 up/down to record store
48553 in history index, but 37617 in history store
Running automatic history store init...
Import complete Re-running sync due to new records locally
Uploading 10964 records to 0190c3daa0ed7c53933dd5eaeb013b8f/history
[00:00:12] [##########################################################################################################################################################################################################] 10,964/10,964 (0.0s)10965/0 up/down to record store
Sync complete! 48553 items in history database, force: false |
It looks like you're doing "HOST" searches here and are using macos. Is it possible that the hostname macos is reporting is different between the time when the command is looked up and the content stored in the history database? See #2391 for an issue I wrote about this and a workaround. |
Hmmm interesting, I just installed 15.1. Are you saying that on 15.0 you should no longer have this issue, and you don't need to run |
In both cases (before 15.0 and on 15.0 and later) its desirable to use Updating to MacOS 15.0 from something before 15.0 will change the hostname in many cases, causing atuin after the upgrade to potentially believe the host is different (because the hostname changed), and Host searches in atuin will return a new/different list of commands. And if on MacOS 15.0 and later, it's more likely that if someone has multiple computers, atuin (due to hostname stuff) might consider them to be the same/different computer depending on which gets their hostname assignment first. I noticed this issue (in #2391) because it showed up for me more clearly after the macos upgrade to 15.0. You can check if this is what you're seeing here by seeing what |
Well, you're entirely correct. I just checked the sqlite db and in the hostname column and the hostname for the same laptop has indeed changed several times! So, I guess the next steps would be to run the |
Looks like LocalHostName and HostName are different. I ended up setting them both to the same thing.
|
What did you expect to happen?
I went to search my history for
gcloud
but there were no valid hits. I know I just used that command about 20 times this week, so it didn't make sense that nothing was showing up. Well, when I say nothing, I mean nothing that has the wordgcloud
in it. None of those commands have the word gcloud, I tried "gcloud" and justgcloud
. Nothing.What happened?
Running
atuin stats
atuin is counting the times I've usedgcloud
.Checking the SQLite db 37599 is the number of rows I have.
If I search the command column for
contains gcloud
I get 675 rows.If I
cat ~/.zsh_history | grep gcloud
I see results.Atuin doctor output
Code of Conduct
The text was updated successfully, but these errors were encountered: