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

Zoxide fails to visit folder #969

Closed
schuelermine opened this issue Jan 7, 2025 · 2 comments
Closed

Zoxide fails to visit folder #969

schuelermine opened this issue Jan 7, 2025 · 2 comments

Comments

@schuelermine
Copy link
Contributor

I have directories

  • ~/Documents/git
  • ~/Documents/git/github.com
  • ~/Documents/Z[redacted]/git

Repeatedly running z git (in my case, z is aliased to y) only ever visits the second and the third of these.

I am using Fish 3.7.1 on NixOS. My config runs /nix/store/l4k3n4vi2y5qjzzhihr37jwhwxz4vxdq-zoxide-0.9.6/bin/zoxide init fish --cmd y | source.

image

@azaleacolburn
Copy link

azaleacolburn commented Mar 24, 2025

@ajeetdsouza From what I can tell, this is the expected behavior of zoxide query, which returns the highest scored directory, excluding the one you're in. This means if you repeated run it with the same argument when there are multiple results, it will oscillate between the first and second highest scored results. This is intended behavior as far as I can tell. However, I'm new to project and could be wrong.

This explanation could be checked by running the command zoxide query git --score --list and seeing if the second and third directory are the top two scores.

If there are plans to change zoxide query to account for recently queried directories, eg. to lower the score of recently returned directories when subsequent queries with the same argument are made (either temporarily or permanently), we should consider the similar issue #1020 as well.

@ajeetdsouza
Copy link
Owner

Yup, that is expected behaviour. To go to lower-ranked directories, you can use zi, or Space-Tab completions (see the README for more details).

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

3 participants