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

fix command for powershell #680

Closed
wants to merge 1 commit into from

Conversation

AbhimanyuAryan
Copy link

the old command doesn't work and gives error

zoxide: PWD hooks are not supported below powershell 6.
        Use 'zoxide init powershell --hook prompt' instead.
At line:1 char:1
+ . 'C:\Users\aryan\Documents\WindowsPowerShell\Microsoft.PowerShell_pr ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Microsoft.PowerShell_profile.ps1

the old command doesn't work and gives error

```
zoxide: PWD hooks are not supported below powershell 6.
        Use 'zoxide init powershell --hook prompt' instead.
At line:1 char:1
+ . 'C:\Users\aryan\Documents\WindowsPowerShell\Microsoft.PowerShell_pr ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Microsoft.PowerShell_profile.ps1
```
@ajeetdsouza
Copy link
Owner

PWD hooks work on PowerShell 7+ and above, the prompt hook has been kept as a fallback for older versions. You're probably running PowerShell 5, you can either upgrade it or modify the command to --hook prompt.

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 this pull request may close these issues.

2 participants