docs: add PowerShell prompt compatibility note to README

Add a note explaining that zoxide must be initialized after prompt theme tools (e.g. oh-my-posh, starship, posh-git) in PowerShell. This limitation is unique to PowerShell; other shells like Bash and Zsh use array-based hook mechanisms and are not affected.
This commit is contained in:
LingyeNBird 2026-07-04 22:35:43 +08:00
parent f84f9a3e1d
commit fdce8bb3a1
1 changed files with 6 additions and 0 deletions

View File

@ -281,6 +281,12 @@ zoxide can be installed in 4 easy steps:
> ```powershell
> Invoke-Expression (& { (zoxide init powershell | Out-String) })
> ```
>
> **Note for PowerShell users:** If you use a prompt theme tool (such as
> oh-my-posh, starship, or posh-git), make sure zoxide is initialized
> **after** it in your profile. This is because zoxide wraps the existing
> `prompt` function to record directories. This is not a concern on other
> shells like Bash or Zsh.
</details>