mirror of
https://github.com/Llewellynvdm/zoxide.git
synced 2024-11-22 04:45:20 +00:00
Fix hook initialization on Powershell (#280)
This commit is contained in:
parent
c872b96703
commit
095e9d3d6c
@ -34,7 +34,11 @@ function __zoxide_hook {
|
||||
}
|
||||
|
||||
# Initialize hook.
|
||||
if (-Not (Get-Command '__zoxide_hook' -ErrorAction SilentlyContinue)) {
|
||||
{# Initialize $__zoxide_hooked if it does not exist. Removing this will cause
|
||||
# an unset variable error in StrictMode. #}
|
||||
$__zoxide_hooked = (Get-Variable __zoxide_hooked -ValueOnly -ErrorAction SilentlyContinue)
|
||||
if ($__zoxide_hooked -ne 1) {
|
||||
$__zoxide_hooked = 1
|
||||
{%- match hook %}
|
||||
{%- when InitHook::None %}
|
||||
{{ not_configured }}
|
||||
|
Loading…
Reference in New Issue
Block a user