diff --git a/wtp/completion.zsh b/wtp/completion.zsh index 2f941c3..34456f2 100644 --- a/wtp/completion.zsh +++ b/wtp/completion.zsh @@ -1,6 +1,9 @@ #!/usr/bin/env zsh # wtp completion - loads after compinit -if command -v wtp >/dev/null 2>&1; then - eval "$(wtp completion zsh)" +# Use absolute path to avoid PATH resolution issues during shell reload +if [[ -x "$HOME/bin/wtp" ]]; then + eval "$("$HOME/bin/wtp" completion zsh 2>/dev/null)" +elif command -v wtp >/dev/null 2>&1; then + eval "$(wtp completion zsh 2>/dev/null)" fi diff --git a/zsh/wtp.zsh b/zsh/wtp.zsh index 95bb02e..51cc5b0 100644 --- a/zsh/wtp.zsh +++ b/zsh/wtp.zsh @@ -5,6 +5,9 @@ # Initialize wtp shell hook for cd functionality # Note: completion is handled in wtp/completion.zsh after compinit -if command -v wtp >/dev/null 2>&1; then - eval "$(wtp hook zsh)" +# Use absolute path to avoid PATH resolution issues during shell reload +if [[ -x "$HOME/bin/wtp" ]]; then + eval "$("$HOME/bin/wtp" hook zsh 2>/dev/null)" +elif command -v wtp >/dev/null 2>&1; then + eval "$(wtp hook zsh 2>/dev/null)" fi