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 "zi" hangs when mount point is in list (/mnt) that's unavailable #804

Closed
samsnori opened this issue Apr 26, 2024 · 1 comment · Fixed by #809
Closed

Zoxide "zi" hangs when mount point is in list (/mnt) that's unavailable #804

samsnori opened this issue Apr 26, 2024 · 1 comment · Fixed by #809

Comments

@samsnori
Copy link

Since a couple of weeks I've noticed that when I try to move into a directory using zi that it takes a very long time before zi finishes and moves into the directory. As I mainly use joshuto as my file manager I thought this was an issue with joshuto but it's zoxide. Or, rather is probably my filesystem.

When I run strace zoxide query -i and I try to move into a directory I see:

--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=2920156, si_uid=1000, si_status=0, si_utime=5 /* 0.05 s */, si_stime=4 /* 0.04 s */} ---
statx(AT_FDCWD, "/mnt/windows/project", AT_STATX_SYNC_AS_STAT, STATX_ALL

This is where it seems to hang. After ~10-20 seconds the command finishes and I've entered the directory.

I have added this to my .bashrc to prevent my /mnt dir from being indexed:

export _ZO_EXCLUDE_DIRS=/mnt/*

Then I started to remove the /mnt/<dir> entries which are currently already in my database. However when I run the following command it seems that it doesn't remove the files from the database. When I run zoxide query -i I can still see the just removed entries.

zoxide remove /mnt/<somedir>

How can I cleanup my database so that all /mnt entries are removed?
Is there an solution where I can ask to remove everything that starts with /mnt/ ?
...and is there another solution where I can keep /mnt in my database but prevent the stall of 10-20 sec?

@ajeetdsouza
Copy link
Owner

Added a fix that will lazily remove excluded directories when querying them. This will be released with zoxide 0.9.5.

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

Successfully merging a pull request may close this issue.

2 participants