From 9be3764104bf3c334848b86c135d6e3390d392d1 Mon Sep 17 00:00:00 2001 From: Lucas Pimentel Date: Thu, 26 Mar 2026 14:12:27 -0400 Subject: [PATCH 01/15] fix: use cross-platform wrapper for wt CLI in plugin hooks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On Windows the binary is git-wt.exe, not wt. Add a wt.sh wrapper script that detects the platform and calls the correct binary, then update hooks.json to use it via ${CLAUDE_PLUGIN_ROOT}. 🤖 Co-Authored-By: Claude Code --- .claude-plugin/hooks/hooks.json | 6 +++--- .claude-plugin/hooks/wt.sh | 11 +++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) create mode 100755 .claude-plugin/hooks/wt.sh diff --git a/.claude-plugin/hooks/hooks.json b/.claude-plugin/hooks/hooks.json index 4c1455b2e..8713e2cb6 100644 --- a/.claude-plugin/hooks/hooks.json +++ b/.claude-plugin/hooks/hooks.json @@ -5,7 +5,7 @@ "hooks": [ { "type": "command", - "command": "wt config state marker set 🤖 || true" + "command": "bash \"${CLAUDE_PLUGIN_ROOT}/.claude-plugin/hooks/wt.sh\" config state marker set 🤖 || true" } ] } @@ -16,7 +16,7 @@ "hooks": [ { "type": "command", - "command": "wt config state marker set 💬 || true" + "command": "bash \"${CLAUDE_PLUGIN_ROOT}/.claude-plugin/hooks/wt.sh\" config state marker set 💬 || true" } ] } @@ -27,7 +27,7 @@ "hooks": [ { "type": "command", - "command": "wt config state marker clear || true" + "command": "bash \"${CLAUDE_PLUGIN_ROOT}/.claude-plugin/hooks/wt.sh\" config state marker clear || true" } ] } diff --git a/.claude-plugin/hooks/wt.sh b/.claude-plugin/hooks/wt.sh new file mode 100755 index 000000000..7203a5add --- /dev/null +++ b/.claude-plugin/hooks/wt.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +# Cross-platform wrapper for the worktrunk CLI. +# Calls git-wt.exe on Windows, wt elsewhere. +# Usage: wt.sh [args...] + +case "$(uname -o 2>/dev/null)" in + Msys|Cygwin) WT=git-wt.exe ;; + *) WT=wt ;; +esac + +"$WT" "$@" From 79088587dcd5050f21079baf31de870acc6d98ec Mon Sep 17 00:00:00 2001 From: worktrunk-bot <254187624+worktrunk-bot@users.noreply.github.com> Date: Thu, 26 Mar 2026 18:37:41 +0000 Subject: [PATCH 02/15] fix: prefer git-wt.exe on Windows, fall back to wt On Windows, try git-wt.exe first and fall back to wt if it doesn't exist. This handles users who have deactivated the wt alias. Co-Authored-By: Claude Opus 4.6 --- .claude-plugin/hooks/wt.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.claude-plugin/hooks/wt.sh b/.claude-plugin/hooks/wt.sh index 7203a5add..1146162e4 100755 --- a/.claude-plugin/hooks/wt.sh +++ b/.claude-plugin/hooks/wt.sh @@ -1,11 +1,18 @@ #!/usr/bin/env bash # Cross-platform wrapper for the worktrunk CLI. -# Calls git-wt.exe on Windows, wt elsewhere. +# On Windows (MSYS/Cygwin), prefers git-wt.exe if available, falls back to wt. +# On other platforms, uses wt. # Usage: wt.sh [args...] case "$(uname -o 2>/dev/null)" in - Msys|Cygwin) WT=git-wt.exe ;; - *) WT=wt ;; + Msys|Cygwin) + if command -v git-wt.exe >/dev/null 2>&1; then + WT=git-wt.exe + else + WT=wt + fi + ;; + *) WT=wt ;; esac "$WT" "$@" From 5e46cc088facc06b6436cad6ec992e4aba23b94b Mon Sep 17 00:00:00 2001 From: Lucas Pimentel Date: Thu, 26 Mar 2026 14:41:50 -0400 Subject: [PATCH 03/15] refactor: condense wt.sh Windows detection into single if-statement MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Co-Authored-By: Claude Code --- .claude-plugin/hooks/wt.sh | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/.claude-plugin/hooks/wt.sh b/.claude-plugin/hooks/wt.sh index 1146162e4..5b96d028d 100755 --- a/.claude-plugin/hooks/wt.sh +++ b/.claude-plugin/hooks/wt.sh @@ -4,15 +4,10 @@ # On other platforms, uses wt. # Usage: wt.sh [args...] -case "$(uname -o 2>/dev/null)" in - Msys|Cygwin) - if command -v git-wt.exe >/dev/null 2>&1; then - WT=git-wt.exe - else - WT=wt - fi - ;; - *) WT=wt ;; -esac +if [[ "$(uname -o 2>/dev/null)" =~ ^(Msys|Cygwin)$ ]] && command -v git-wt.exe >/dev/null 2>&1; then + WT=git-wt.exe +else + WT=wt +fi "$WT" "$@" From b24c3648e771b53325e81757a73a43fdfb263ae7 Mon Sep 17 00:00:00 2001 From: Lucas Pimentel Date: Thu, 26 Mar 2026 14:57:27 -0400 Subject: [PATCH 04/15] fix: skip Windows Terminal alias when resolving wt on Windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Check that `wt` doesn't resolve to the WindowsApps directory before using it as a fallback, since that path is the Windows Terminal alias. 🤖 Co-Authored-By: Claude Code --- .claude-plugin/hooks/wt.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.claude-plugin/hooks/wt.sh b/.claude-plugin/hooks/wt.sh index 5b96d028d..cc2ce2e97 100755 --- a/.claude-plugin/hooks/wt.sh +++ b/.claude-plugin/hooks/wt.sh @@ -1,13 +1,18 @@ #!/usr/bin/env bash # Cross-platform wrapper for the worktrunk CLI. -# On Windows (MSYS/Cygwin), prefers git-wt.exe if available, falls back to wt. +# On Windows (MSYS/Cygwin), prefers git-wt.exe if available, then wt if it +# isn't the Windows Terminal alias (which lives in WindowsApps). # On other platforms, uses wt. # Usage: wt.sh [args...] -if [[ "$(uname -o 2>/dev/null)" =~ ^(Msys|Cygwin)$ ]] && command -v git-wt.exe >/dev/null 2>&1; then - WT=git-wt.exe -else - WT=wt +if [[ "$(uname -o 2>/dev/null)" =~ ^(Msys|Cygwin)$ ]]; then + if command -v git-wt.exe >/dev/null 2>&1; then + WT=git-wt.exe + elif [[ "$(command -v wt 2>/dev/null)" != *WindowsApps* ]]; then + WT=wt + fi fi +: "${WT:=wt}" + "$WT" "$@" From faa0f7cf495d12db19ed1fa4504e08800587540c Mon Sep 17 00:00:00 2001 From: Lucas Pimentel Date: Thu, 26 Mar 2026 15:51:40 -0400 Subject: [PATCH 05/15] Apply suggestion from @worktrunk-bot Co-authored-by: worktrunk-bot --- .claude-plugin/hooks/wt.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.claude-plugin/hooks/wt.sh b/.claude-plugin/hooks/wt.sh index cc2ce2e97..eabeaad45 100755 --- a/.claude-plugin/hooks/wt.sh +++ b/.claude-plugin/hooks/wt.sh @@ -10,9 +10,13 @@ if [[ "$(uname -o 2>/dev/null)" =~ ^(Msys|Cygwin)$ ]]; then WT=git-wt.exe elif [[ "$(command -v wt 2>/dev/null)" != *WindowsApps* ]]; then WT=wt + else + echo "worktrunk: wt resolves to Windows Terminal; install git-wt or add worktrunk to PATH" >&2 + exit 1 fi +else + WT=wt fi -: "${WT:=wt}" - +"$WT" "$@" "$WT" "$@" From e93b4bdb77e759edefe6207fcb666269798b6904 Mon Sep 17 00:00:00 2001 From: Lucas Pimentel Date: Thu, 26 Mar 2026 15:54:22 -0400 Subject: [PATCH 06/15] fix: remove duplicate wt invocation and clarify error message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Co-Authored-By: Claude Code --- .claude-plugin/hooks/wt.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.claude-plugin/hooks/wt.sh b/.claude-plugin/hooks/wt.sh index eabeaad45..706907ea3 100755 --- a/.claude-plugin/hooks/wt.sh +++ b/.claude-plugin/hooks/wt.sh @@ -11,7 +11,7 @@ if [[ "$(uname -o 2>/dev/null)" =~ ^(Msys|Cygwin)$ ]]; then elif [[ "$(command -v wt 2>/dev/null)" != *WindowsApps* ]]; then WT=wt else - echo "worktrunk: wt resolves to Windows Terminal; install git-wt or add worktrunk to PATH" >&2 + echo "worktrunk: 'wt' resolves to Windows Terminal; install worktrunk as git-wt.exe or replace the Windows Terminal alias" >&2 exit 1 fi else @@ -19,4 +19,3 @@ else fi "$WT" "$@" -"$WT" "$@" From 987af814257bfe8f96e569e260eaa6ba0a488444 Mon Sep 17 00:00:00 2001 From: Lucas Pimentel Date: Thu, 26 Mar 2026 16:01:05 -0400 Subject: [PATCH 07/15] bump plugin's patch version --- .claude-plugin/plugin.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 1cd9dce03..76318fb29 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "worktrunk", "description": "Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows. This plugin provides configuration guidance (LLM commit messages, project hooks, worktree paths) and automatic activity tracking (🤖/💬 indicators in `wt list` showing active Claude sessions).", - "version": "1.0.0", + "version": "1.0.1", "author": { "name": "Worktrunk" }, From 78f85b8ec04f15a6963ec362f6f462475a5492f5 Mon Sep 17 00:00:00 2001 From: Lucas Pimentel Date: Thu, 26 Mar 2026 16:17:46 -0400 Subject: [PATCH 08/15] fix: simplify wt.sh binary resolution and improve error messages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove OS-specific branching — git-wt.exe check is harmless on non-Windows. Add missing PATH validation and distinct error for Windows Terminal alias vs not-found cases. 🤖 Co-Authored-By: Claude Code --- .claude-plugin/hooks/wt.sh | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.claude-plugin/hooks/wt.sh b/.claude-plugin/hooks/wt.sh index 706907ea3..2617d31b2 100755 --- a/.claude-plugin/hooks/wt.sh +++ b/.claude-plugin/hooks/wt.sh @@ -5,17 +5,19 @@ # On other platforms, uses wt. # Usage: wt.sh [args...] -if [[ "$(uname -o 2>/dev/null)" =~ ^(Msys|Cygwin)$ ]]; then - if command -v git-wt.exe >/dev/null 2>&1; then - WT=git-wt.exe - elif [[ "$(command -v wt 2>/dev/null)" != *WindowsApps* ]]; then - WT=wt - else - echo "worktrunk: 'wt' resolves to Windows Terminal; install worktrunk as git-wt.exe or replace the Windows Terminal alias" >&2 +# Resolve the worktrunk binary +if command -v git-wt.exe >/dev/null 2>&1; then + WT=git-wt.exe +elif command -v wt >/dev/null 2>&1; then + # On Windows, wt.exe in WindowsApps is Windows Terminal, not worktrunk + if [[ "$(command -v wt)" == *WindowsApps* ]]; then + echo "worktrunk: 'wt' resolves to Windows Terminal; install worktrunk as git-wt.exe or remove the Windows Terminal alias — see https://worktrunk.dev/worktrunk/#install" >&2 exit 1 fi -else WT=wt +else + echo "worktrunk: could not find 'wt' in PATH" >&2 + exit 1 fi "$WT" "$@" From c706a177c56efdbd826bb17ccb49ca550d5bbcbe Mon Sep 17 00:00:00 2001 From: Lucas Pimentel Date: Thu, 26 Mar 2026 16:45:43 -0400 Subject: [PATCH 09/15] docs: update wt.sh header comments to match simplified logic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Co-Authored-By: Claude Code --- .claude-plugin/hooks/wt.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.claude-plugin/hooks/wt.sh b/.claude-plugin/hooks/wt.sh index 2617d31b2..d8d70c73e 100755 --- a/.claude-plugin/hooks/wt.sh +++ b/.claude-plugin/hooks/wt.sh @@ -1,8 +1,7 @@ #!/usr/bin/env bash # Cross-platform wrapper for the worktrunk CLI. -# On Windows (MSYS/Cygwin), prefers git-wt.exe if available, then wt if it -# isn't the Windows Terminal alias (which lives in WindowsApps). -# On other platforms, uses wt. +# Prefers git-wt.exe, falls back to wt. Rejects wt if it resolves to +# Windows Terminal (WindowsApps/wt.exe). # Usage: wt.sh [args...] # Resolve the worktrunk binary From 64d4c927ac82d562f61e29c4b33e477388bc214b Mon Sep 17 00:00:00 2001 From: Lucas Pimentel Date: Thu, 26 Mar 2026 16:51:45 -0400 Subject: [PATCH 10/15] refactor: restore OS check in wt.sh for fast path on non-Windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Co-Authored-By: Claude Code --- .claude-plugin/hooks/wt.sh | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/.claude-plugin/hooks/wt.sh b/.claude-plugin/hooks/wt.sh index d8d70c73e..ad357efb2 100755 --- a/.claude-plugin/hooks/wt.sh +++ b/.claude-plugin/hooks/wt.sh @@ -1,20 +1,30 @@ #!/usr/bin/env bash # Cross-platform wrapper for the worktrunk CLI. -# Prefers git-wt.exe, falls back to wt. Rejects wt if it resolves to -# Windows Terminal (WindowsApps/wt.exe). +# On Windows (MSYS/Cygwin), prefers git-wt.exe over wt and rejects wt if +# it resolves to Windows Terminal (WindowsApps/wt.exe). +# On other platforms, uses wt directly. # Usage: wt.sh [args...] -# Resolve the worktrunk binary -if command -v git-wt.exe >/dev/null 2>&1; then - WT=git-wt.exe -elif command -v wt >/dev/null 2>&1; then - # On Windows, wt.exe in WindowsApps is Windows Terminal, not worktrunk - if [[ "$(command -v wt)" == *WindowsApps* ]]; then - echo "worktrunk: 'wt' resolves to Windows Terminal; install worktrunk as git-wt.exe or remove the Windows Terminal alias — see https://worktrunk.dev/worktrunk/#install" >&2 - exit 1 +# check for bash on Windows (on Windows, Claude Code defaults to Git Bash) +if [[ "$(uname -o 2>/dev/null)" =~ ^(Msys|Cygwin)$ ]]; then + if command -v git-wt.exe >/dev/null 2>&1; then + # prefer git-wt over wt if available + WT=git-wt.exe + elif command -v wt >/dev/null 2>&1; then + # reject wt if it's the Windows Terminal alias + if [[ "$(command -v wt)" == *WindowsApps* ]]; then + echo "worktrunk: 'wt' resolves to Windows Terminal; install worktrunk as git-wt.exe or remove the Windows Terminal alias — see https://worktrunk.dev/worktrunk/#install" >&2 + exit 1 + fi + + WT=wt fi - WT=wt else + # non-Windows, always use wt + WT=wt +fi + +if [[ -z "$WT" ]] || ! command -v "$WT" >/dev/null 2>&1; then echo "worktrunk: could not find 'wt' in PATH" >&2 exit 1 fi From f531f04dc2d10ee576b15fbbf817ce55d082d557 Mon Sep 17 00:00:00 2001 From: Lucas Pimentel Date: Thu, 26 Mar 2026 18:59:08 -0400 Subject: [PATCH 11/15] fix: skip wt.sh early when not inside a git repository MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The UserPromptSubmit hook runs on every prompt, including outside git repos. Guard against missing git and non-repo directories to prevent "fatal: not a git repository" stderr noise in Claude Code. 🤖 Co-Authored-By: Claude Code --- .claude-plugin/hooks/wt.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.claude-plugin/hooks/wt.sh b/.claude-plugin/hooks/wt.sh index ad357efb2..688ad4da9 100755 --- a/.claude-plugin/hooks/wt.sh +++ b/.claude-plugin/hooks/wt.sh @@ -3,8 +3,14 @@ # On Windows (MSYS/Cygwin), prefers git-wt.exe over wt and rejects wt if # it resolves to Windows Terminal (WindowsApps/wt.exe). # On other platforms, uses wt directly. +# Exits silently if git is unavailable or not inside a git repository. # Usage: wt.sh [args...] +# bail early if git is not available or not inside a git repository +if ! command -v git >/dev/null 2>&1 || ! git rev-parse --git-dir >/dev/null 2>&1; then + exit 0 +fi + # check for bash on Windows (on Windows, Claude Code defaults to Git Bash) if [[ "$(uname -o 2>/dev/null)" =~ ^(Msys|Cygwin)$ ]]; then if command -v git-wt.exe >/dev/null 2>&1; then From 56453947fd972c1ad7a37e8661e78d338d878094 Mon Sep 17 00:00:00 2001 From: Lucas Pimentel Date: Fri, 27 Mar 2026 15:49:59 -0400 Subject: [PATCH 12/15] feat: honor WORKTRUNK_BIN env var in wt.sh wrapper MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When set, use WORKTRUNK_BIN exclusively to find the worktrunk binary instead of searching PATH. Fail with a clear error if not found. 🤖 Co-Authored-By: Claude Code --- .claude-plugin/hooks/wt.sh | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.claude-plugin/hooks/wt.sh b/.claude-plugin/hooks/wt.sh index 688ad4da9..a84a782f1 100755 --- a/.claude-plugin/hooks/wt.sh +++ b/.claude-plugin/hooks/wt.sh @@ -1,7 +1,8 @@ #!/usr/bin/env bash # Cross-platform wrapper for the worktrunk CLI. -# On Windows (MSYS/Cygwin), prefers git-wt.exe over wt and rejects wt if -# it resolves to Windows Terminal (WindowsApps/wt.exe). +# If WORKTRUNK_BIN is set, uses that path exclusively. +# Otherwise, on Windows (MSYS/Cygwin), prefers git-wt.exe over wt and +# rejects wt if it resolves to Windows Terminal (WindowsApps/wt.exe). # On other platforms, uses wt directly. # Exits silently if git is unavailable or not inside a git repository. # Usage: wt.sh [args...] @@ -11,10 +12,16 @@ if ! command -v git >/dev/null 2>&1 || ! git rev-parse --git-dir >/dev/null 2>&1 exit 0 fi -# check for bash on Windows (on Windows, Claude Code defaults to Git Bash) -if [[ "$(uname -o 2>/dev/null)" =~ ^(Msys|Cygwin)$ ]]; then +if [[ -n "$WORKTRUNK_BIN" ]]; then + if ! command -v "$WORKTRUNK_BIN" >/dev/null 2>&1; then + echo "worktrunk: WORKTRUNK_BIN is set to '$WORKTRUNK_BIN' but it was not found" >&2 + exit 1 + fi + WT="$WORKTRUNK_BIN" +elif [[ "$(uname -o 2>/dev/null)" =~ ^(Msys|Cygwin)$ ]]; then + # check for bash on Windows (on Windows, Claude Code defaults to Git Bash) if command -v git-wt.exe >/dev/null 2>&1; then - # prefer git-wt over wt if available + # prefer git-wt over wt if available WT=git-wt.exe elif command -v wt >/dev/null 2>&1; then # reject wt if it's the Windows Terminal alias From 36a84ddce17796c5d6a3315639aca1d2a4c178e7 Mon Sep 17 00:00:00 2001 From: Lucas Pimentel Date: Tue, 21 Apr 2026 17:34:10 -0400 Subject: [PATCH 13/15] don't check in bash script for git repository --- .claude-plugin/hooks/wt.sh | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.claude-plugin/hooks/wt.sh b/.claude-plugin/hooks/wt.sh index a84a782f1..6a64cf99f 100755 --- a/.claude-plugin/hooks/wt.sh +++ b/.claude-plugin/hooks/wt.sh @@ -4,14 +4,8 @@ # Otherwise, on Windows (MSYS/Cygwin), prefers git-wt.exe over wt and # rejects wt if it resolves to Windows Terminal (WindowsApps/wt.exe). # On other platforms, uses wt directly. -# Exits silently if git is unavailable or not inside a git repository. # Usage: wt.sh [args...] -# bail early if git is not available or not inside a git repository -if ! command -v git >/dev/null 2>&1 || ! git rev-parse --git-dir >/dev/null 2>&1; then - exit 0 -fi - if [[ -n "$WORKTRUNK_BIN" ]]; then if ! command -v "$WORKTRUNK_BIN" >/dev/null 2>&1; then echo "worktrunk: WORKTRUNK_BIN is set to '$WORKTRUNK_BIN' but it was not found" >&2 From a3407ae8bab442fe4b77fe0f4fb94c1509a00521 Mon Sep 17 00:00:00 2001 From: Lucas Pimentel Date: Tue, 21 Apr 2026 17:44:45 -0400 Subject: [PATCH 14/15] tweak comment and error message --- .claude-plugin/hooks/wt.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.claude-plugin/hooks/wt.sh b/.claude-plugin/hooks/wt.sh index 6a64cf99f..a7a4a72e1 100755 --- a/.claude-plugin/hooks/wt.sh +++ b/.claude-plugin/hooks/wt.sh @@ -2,7 +2,7 @@ # Cross-platform wrapper for the worktrunk CLI. # If WORKTRUNK_BIN is set, uses that path exclusively. # Otherwise, on Windows (MSYS/Cygwin), prefers git-wt.exe over wt and -# rejects wt if it resolves to Windows Terminal (WindowsApps/wt.exe). +# rejects wt if it resolves to Windows Terminal (.../WindowsApps/wt.exe). # On other platforms, uses wt directly. # Usage: wt.sh [args...] @@ -20,7 +20,7 @@ elif [[ "$(uname -o 2>/dev/null)" =~ ^(Msys|Cygwin)$ ]]; then elif command -v wt >/dev/null 2>&1; then # reject wt if it's the Windows Terminal alias if [[ "$(command -v wt)" == *WindowsApps* ]]; then - echo "worktrunk: 'wt' resolves to Windows Terminal; install worktrunk as git-wt.exe or remove the Windows Terminal alias — see https://worktrunk.dev/worktrunk/#install" >&2 + echo "worktrunk: 'wt' resolves to Windows Terminal; install worktrunk as git-wt.exe or remove the Windows Terminal alias. See https://worktrunk.dev/worktrunk/#install" >&2 exit 1 fi From de3cd47bab31f69df83d6e913346b52b41f41374 Mon Sep 17 00:00:00 2001 From: worktrunk-bot <254187624+worktrunk-bot@users.noreply.github.com> Date: Tue, 5 May 2026 17:43:47 +0000 Subject: [PATCH 15/15] fix(plugin): wrap WorktreeCreate and WorktreeRemove hooks in wt.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These hooks were added to main after this branch and merged in cleanly, but invoked bare wt — undoing the cross-platform wrapper coverage this PR introduces for the other three hooks. Co-Authored-By: Claude Opus 4.7 --- .claude-plugin/hooks/hooks.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.claude-plugin/hooks/hooks.json b/.claude-plugin/hooks/hooks.json index 4e78d3d12..34aa705f9 100644 --- a/.claude-plugin/hooks/hooks.json +++ b/.claude-plugin/hooks/hooks.json @@ -37,7 +37,7 @@ "hooks": [ { "type": "command", - "command": "jq -r '.name' | xargs -I{} wt switch --create {} --no-cd --format=json | jq -r '.path'" + "command": "jq -r '.name' | xargs -I{} bash \"${CLAUDE_PLUGIN_ROOT}/.claude-plugin/hooks/wt.sh\" switch --create {} --no-cd --format=json | jq -r '.path'" } ] } @@ -47,7 +47,7 @@ "hooks": [ { "type": "command", - "command": "jq -r '.worktree_path' | xargs wt remove -D --foreground" + "command": "jq -r '.worktree_path' | xargs bash \"${CLAUDE_PLUGIN_ROOT}/.claude-plugin/hooks/wt.sh\" remove -D --foreground" } ] }