-
Notifications
You must be signed in to change notification settings - Fork 621
z doesn't register directory in PowerShell #1021
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
Comments
Have you:
|
@ajeetdsouza Yes, I installed following the instruction and put this |
I ran into this same issue earlier this week. Do you also use starship by any chance (and have its init called within your powershell script)? Try using Windows' inbuilt powershell instead of pwsh which is what got it working for me. |
Thanks for the info. Yes, I'm using Starship. Do we have a workaround for this? |
same problem here, using starship too |
If you use starship, just make sure the starship initialization happens before the zoxide initialization. Invoke-Expression (&starship init powershell)
Invoke-Expression (& { (zoxide init powershell | Out-String) }) Once you do that, the directory saving/recollection will work correctly in PowerShell. |
In the case of Powershell ( the shell inbuilt in Windows, i.e Version 5.1 and below ), this works and everything works as intended. When using Powershell Core ( Pwsh or Version 6.x, 7.x (current) ), this still does not work. Even with Zoxide being initialized as the last thing in my powershell profile, the directory saving functionality does not work on visiting new directories. Recollection still works on already registered directories ( as that folder already exists in the db ). I do intend to look into what could be causing this soonish. |
Hi, yes I confirm, I'm experiencing the same issue using PS7. I'm not using starship. Zoxide initialized at the end of my PS profile as expected. |
Confirmed that
zoxide query -l
is empty.The text was updated successfully, but these errors were encountered: