feat(hooks): forward run hook stdout to user

Amolith created

Allows hooks to emit reminders or messages during worktree creation.

Assisted-by: Claude Opus 4.5 via Amp

Change summary

src/wt/hooks.lua | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

Detailed changes

src/wt/hooks.lua 🔗

@@ -164,7 +164,13 @@ function M.run_hooks(source, target, hooks, root, home_override)
 	end
 	if hooks.run then
 		for _, cmd in ipairs(hooks.run) do
-			local _, code = run_cmd("cd " .. target .. " && " .. cmd)
+			local output, code = run_cmd("cd " .. target .. " && " .. cmd)
+			if output ~= "" then
+				io.write(output)
+				if not output:match("\n$") then
+					io.write("\n")
+				end
+			end
 			if code ~= 0 then
 				io.stderr:write("warning: hook command failed: " .. cmd .. "\n")
 			end