Closed GitMurf closed 1 month ago
There was a bug on v0.9.1 that was immediately fixed, the latest version is v0.9.6. Could you try upgrading?
There was a bug on v0.9.1 that was immediately fixed, the latest version is v0.9.6. Could you try upgrading?
Yes, I actually was on 0.9.6 when it was happening. I re-installed each version back to v0.9.0 to figure out when the problem started occurring for me. It happens in every version since 0.9.0.
BUT in the meantime @ajeetdsouza I actually came back here to mention this comment here: https://github.com/ajeetdsouza/zoxide/issues/644#issuecomment-1817679837
This clued me in to move zoxide to the very end of my powershell profile. It seems that the issue is if you are using any custom prompt, in my case Starship, you must put the zoxide init very last.
But the weird thing @ajeetdsouza is that for whatever reason, this was NOT required to be put last in v0.9.0. Do you have any idea why that may be?
Regardless, I think it would be helpful to add to the README instructions for powershell that you should put the zoxide init last in your powershell profile especially if using a custom prompt like Starship, oh-my-posh etc.
Thoughts? Any questions? Thanks for the quick response!
And, somehow I am an idiot and it already says to add to the end 🫤
Still weird that v0.9.0 did not require it to be last in my profile, but in case others run into similar issues and find this gh issue based on keywords, just always make sure your zoxide init code is the very last thing in your powershell profile file.
The last few months I have been feeling like zoxide was not working properly but had not spent the time to deep dive into why. The problem is that it suddenly felt like paths were not getting added to the database. I finally dug into it by uninstalling and re-installing with older versions until I identified that the problem must have started between v0.9.0 and v0.9.1.
I am on Windows 11 and use Windows Terminal with PowerShell.
Historically if I ever went to a "new path" using
z PATH
that would automatically add the path to the database. So for example if I used:z C:\tools\neovim
then next time I could just doz neovim
orzi neovim
and the path would work. I believe I was on v0.9.0 until a few months ago when I switched from using choco to using scoop and then updated all my cli tools (hence why a few months ago is when I started noticing the change in behavior).Things still work as expected if I do the full
zoxide add C:\tools\neovim
but my assumption is that you do not have to explicitly dozoxide add PATH
each time and can just usez PATH
to add new items. As described above, this is certainly how it worked up through v0.9.0.