Initialize hook only if it's a `pwd` hook
This commit is contained in:
parent
435a62266a
commit
3883fcd487
|
|
@ -6,7 +6,7 @@
|
|||
{%- if echo -%}
|
||||
{%- call batch::indent(tabs) %} ^&^& {%~ call pwd(tabs + 1) -%}^
|
||||
{%- endif -%}
|
||||
{%- if hook != InitHook::None -%}
|
||||
{%- if hook == InitHook::Pwd -%}
|
||||
{%- call batch::indent(tabs) %} ^&^& for /f "delims=" %$p%a in ('"%__builtin_pwd%"') do @if /i not "%$p%~dpa"=="%$p%~fa" (^
|
||||
{%- call batch::indent(tabs) %} zoxide add -- "%$p%~fa"^
|
||||
{%- call batch::indent(tabs) %} ) else (^
|
||||
|
|
|
|||
Loading…
Reference in New Issue