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

[Bug]: Import for ZSH loads first history file found #2593

Open
1 task done
rodrigomideac opened this issue Feb 20, 2025 · 1 comment
Open
1 task done

[Bug]: Import for ZSH loads first history file found #2593

rodrigomideac opened this issue Feb 20, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@rodrigomideac
Copy link

What did you expect to happen?

When running atuin import zsh it should import the history that history shows and all these commands should be available for atuin.

What happened?

atuin import zsh imported a legacy history file that I had on ~/.zhistory, instead of using my /home/myusername/.zsh_history that was set on HISTFILE.

Atuin doctor output

{
  "atuin": {
    "version": "18.4.0",
    "sync": null,
    "sqlite_version": "3.46.0"
  },
  "shell": {
    "name": "zsh",
    "default": "zsh",
    "plugins": [
      "atuin"
    ],
    "preexec": "built-in"
  },
  "system": {
    "os": "Manjaro Linux",
    "arch": "x86_64",
    "version": "25.0.0",
    "disks": [
      {
        "name": "/dev/nvme0n1p2",
        "filesystem": "ext4"
      },
      {
        "name": "/dev/nvme0n1p1",
        "filesystem": "vfat"
      }
    ]
  }
}

Code of Conduct

  • I agree to follow this project's Code of Conduct
@rodrigomideac rodrigomideac added the bug Something isn't working label Feb 20, 2025
@rodrigomideac
Copy link
Author

It probably is related to processing the first element (.zhistory) here:

let mut candidates = [".zhistory", ".zsh_history", ".histfile"].iter();

I am open to implement any fix that you suggest!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant