pwsh starship fix

Fixes the custom hook generated by starship. Now allowing zoxide to add
directories when using pwsh.
This commit is contained in:
rijulkap 2025-03-22 14:26:05 +10:00
parent 2480ed0853
commit 21cd84fc3a
2 changed files with 6 additions and 3 deletions

View File

@ -10,7 +10,7 @@ name = "zoxide"
readme = "README.md"
repository = "https://github.com/ajeetdsouza/zoxide"
rust-version = "1.74.1"
version = "0.9.7"
version = "0.9.8"
[badges]
maintenance = { status = "actively-developed" }

View File

@ -86,10 +86,13 @@ if ($global:__zoxide_hooked -ne 1) {
$global:__zoxide_prompt_old = $function:prompt
function global:prompt {
if ($null -ne $__zoxide_prompt_old) {
& $__zoxide_prompt_old
$customPrompt = ""
if ($null -ne $global:__zoxide_prompt_old) {
$customPrompt = & $global:__zoxide_prompt_old
}
$null = __zoxide_hook
return $customPrompt
}
}
{%- endif %}