pwsh starship fix
Fixes the custom hook generated by starship. Now allowing zoxide to add directories when using pwsh.
This commit is contained in:
parent
2480ed0853
commit
21cd84fc3a
|
|
@ -10,7 +10,7 @@ name = "zoxide"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
repository = "https://github.com/ajeetdsouza/zoxide"
|
repository = "https://github.com/ajeetdsouza/zoxide"
|
||||||
rust-version = "1.74.1"
|
rust-version = "1.74.1"
|
||||||
version = "0.9.7"
|
version = "0.9.8"
|
||||||
|
|
||||||
[badges]
|
[badges]
|
||||||
maintenance = { status = "actively-developed" }
|
maintenance = { status = "actively-developed" }
|
||||||
|
|
|
||||||
|
|
@ -86,10 +86,13 @@ if ($global:__zoxide_hooked -ne 1) {
|
||||||
$global:__zoxide_prompt_old = $function:prompt
|
$global:__zoxide_prompt_old = $function:prompt
|
||||||
|
|
||||||
function global:prompt {
|
function global:prompt {
|
||||||
if ($null -ne $__zoxide_prompt_old) {
|
$customPrompt = ""
|
||||||
& $__zoxide_prompt_old
|
if ($null -ne $global:__zoxide_prompt_old) {
|
||||||
|
$customPrompt = & $global:__zoxide_prompt_old
|
||||||
}
|
}
|
||||||
$null = __zoxide_hook
|
$null = __zoxide_hook
|
||||||
|
|
||||||
|
return $customPrompt
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue