-
Notifications
You must be signed in to change notification settings - Fork 8
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]: __zoxide_cd:cd:2: no such file or directory: foo
#37
Comments
__zoxide_cd:cd:2: no such file or directory: foo
Hi @ruimarinho 👋 Thank you for opening the issue, unfortunately, I am unable to reproduce the issue, however, I have attempted on The code snippet you provided has a redundant ice-modifier atload: atload="function z() { __zoxide_z \"\$@\" }" This plugin automatically hooks x and xi for Zi, this behavior can be changed by setting prefix variable _ZO_CMD_PREFIX:
Example to set c, ci zi has'zoxide' wait lucid for atinit="_ZO_CMD_PREFIX=c" \
z-shell/zsh-zoxide
Could you please confirm that the issue persists when the redundant ice-modifier is not used, and could you try another install method? This would help me to identify the issue. |
Hi @ss-o, That ice modifier enables If I use the traditional install method without the ice modifier, I get this instead:
If I manually eval the output of:
I get:
It's something to do with the async integration for sure. |
I'm trying to narrow the problem and I'm getting closer, but I still don't know what causes the buggy outcome. Calling This eliminates the scenario where a cached eval could be causing issues. I'm wondering if it's a bug in the plugin framework of |
If I copy the output of the cached eval and manually load it via a snippet, it also works:
|
Thank you for your detailed response, I am working on this now. Could you please provide the output of the following:
The My current state: ➜ ~ echo $chpwd_functions
@zi-scheduler State with the plugin which sets ➜ ~ echo $chpwd_functions
→auto-lsd @zi-scheduler Manually executed Snippet used for the example above: zi-turbo '0a' for \
binary from"gh-r" sbin \
ajeetdsouza/zoxide \
has'lsd' atinit'AUTOCD=1' \
z-shell/zsh-lsd \
has'zoxide' \
z-shell/zsh-zoxide Summarized the snippet in concern: ❯ echo $chpwd_functions
__zoxide_hook @zi-scheduler The |
It is a good clue for tracing. Could you confirm that snippet: zi has'zoxide' wait lucid for \
atload="function z() { __zoxide_z \"\$@\" }" \
z-shell/zsh-zoxide Fails when:
Branch zi has'zoxide' ver'auto_pushd' wait lucid for \
atload="function z() { __zoxide_z \"\$@\" }" \
z-shell/zsh-zoxide |
With:
When I do:
...both are successful. However, I can check the zoxide hook wasn't called because zoxide does not record the chpwd:
I can use
..but only if I give it an actual path.
This should have worked but it doesn't. Using the
|
I have found a problem, currently testing 👍 I will update on this as soon as possible |
I'm around so I think I'll be able to provide quick feedback :) thanks a lot! |
Yep, works perfectly now. Fantastic! |
Hopefully, the |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Environment
Device: apple | darwin22.0 | arm64 | Shell: /bin/zsh | -zsh | zsh-5.8.1-0-g1a490c7 Zi: 75929e8f4425761a64591d0f6c23dbb0c64261fc | zoxide v0.9.0
Reproduction steps
x
orz
(in this case). For every directory,__zoxide_cd:cd:2: no such file or directory: <directory>
is returned.Expected behavior
x
orz<SPACE><DIRECTORY>
correctly hooks into zoxide.Current behavior
For every directory,
__zoxide_cd:cd:2: no such file or directory: <directory>
is returned.Code snippet
Additional information
Using zsh-zoxide in isolation (no other plugins) results in the same behaviour.
It seems like zi is resetting
$chpwd_functions
because if I echo that once the shell is loaded, only@zi-scheduler
is listed there....yet:
Self-service
Have you read the Contributing Guidelines?
Are you familiar with the Contributor Covenant Code of Conduct?
Contact Details
No response
The text was updated successfully, but these errors were encountered: