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

z rustfmt navigates to an incorrect rustfmt directory #892

Closed
rufevean opened this issue Sep 23, 2024 · 1 comment
Closed

z rustfmt navigates to an incorrect rustfmt directory #892

rufevean opened this issue Sep 23, 2024 · 1 comment

Comments

@rufevean
Copy link

Description

I encountered an issue when trying to navigate to a directory containing rustfmt using zoxide. I expected z rustfmt to take me to the directory I was currently in, where rustfmt is present. Instead, it forwarded me to a different directory that also contains rustfmt.

Steps to Reproduce

  1. Be in a directory that contains a rustfmt binary or folder (e.g., /path/to/my-project/rustfmt).
  2. Run z rustfmt from the terminal.
  3. Observe that zoxide forwards you to another directory (e.g., /other/path/to/rustfmt).

Expected Behavior

I expected z rustfmt to prioritize the rustfmt directory in the current context .

Actual Behavior

z rustfmt navigates to a different rustfmt directory, ignoring the current context.

@ajeetdsouza
Copy link
Owner

That's the expected behaviour - the directory you're currently in is excluded from the z results. So if you're in the best match, you will end up jumping to the second best match.

This is especially useful in cases where zoxide jumps to the wrong directory - you can just re-run your previous command and it will jump to another match.

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

2 participants