Skip to content

[Bug]: [search] filters behaviour inconsistent when used with workspace in filter #2700

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

Open
1 task done
merc1031 opened this issue Apr 14, 2025 · 1 comment
Open
1 task done
Labels
bug Something isn't working

Comments

@merc1031
Copy link

What did you expect to happen?

[1]

workspaces = true

[search]
filters = ["workspace", "host"]

In non git directory, pressing ctrl+r expected host to come up first

[2]

workspaces = true

[search]
filters = ["workspace", "host", "directory"]

In non git directory, pressing ctrl+r expected host to come up first , then directory, then host, then directory ...

[3]
Works as expected in a git directory

What happened?

[1] instead global comes up, then host, then further presses do nothing
[2] instead global comes up, then host, then directory , then host, then directory ...
[3] pressing ctrl+r expected workspace to come up first, host to come up next , then directory, then worksapce, then host ...

Atuin doctor output

{
  "atuin": {
    "version": "18.5.0",
    "sync": {
      "cloud": false,
      "records": true,
      "auto_sync": true,
      "last_sync": "2025-04-14 20:10:41.509478585 +00:00:00"
    },
    "sqlite_version": "3.46.0"
  },
  "shell": {
    "name": "zsh",
    "default": "zsh",
    "plugins": [
      "atuin"
    ],
    "preexec": "built-in"
  },
  "system": {
    "os": "Ubuntu",
    "arch": "x86_64",
    "version": "24.04",
    "disks": [
      {
        "name": "/dev/mapper/ubuntu--vg-ubuntu--lv",
        "filesystem": "ext4"
      },
      {
        "name": "/dev/nvme0n1p2",
        "filesystem": "ext4"
      },
      {
        "name": "/dev/nvme0n1p1",
        "filesystem": "vfat"
      }
    ]
  }
}

Code of Conduct

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

This is my first time looking at atuin's source, but ill give a try to fix this.

merc1031 added a commit to merc1031/atuin that referenced this issue Apr 16, 2025
Do not just pick first from search.filters, consider all options,
filtering based on git-root and workspaces config

atuinsh#2700
merc1031 added a commit to merc1031/atuin that referenced this issue Apr 16, 2025
Do not just pick first from search.filters, consider all options,
filtering based on git-root and workspaces config

atuinsh#2700
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