diff --git a/templates/cmd.txt b/templates/cmd.txt index 9a07fc9..f033226 100644 --- a/templates/cmd.txt +++ b/templates/cmd.txt @@ -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 (^