Replace cd with z in Powershell #960
-
I’m using PowerShell 7 on Windows 11, and I’d like to replace the default cd command with z (from Zoxide) so that whenever I type cd, it behaves like z. I tried a couple of approaches, but I’m running into issues. Specifically: Setting an alias: I tried Set-Alias cd z, but the built-in cd still interferes, and it doesn’t give me the desired behavior. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Strange, Invoke-Expression (& { (zoxide init --cmd cd powershell | Out-String) }) works for me, did you place it in the right place? |
Beta Was this translation helpful? Give feedback.
-
Works perfectly on Linux had no issue for the last 6 months at all
also thanks for replying |
Beta Was this translation helpful? Give feedback.
Strange,
works for me, did you place it in the right place?