Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
fix: show hook path when shell integration inactive (#385)
Maximilian Roosfb064e82907f
diff --git a/src/commands/merge.rs b/src/commands/merge.rsindex 93495b93f..adb13598d 100644--- a/src/commands/merge.rs+++ b/src/commands/merge.rs@@ -282,13 +282,16 @@ pub fn handle_merge(opts: MergeOptions<'_>) -> anyhow::Result<()> {&destination_repo_root,yes,);- // Show path when user's shell stays in a different directory than where hooks run.- // This happens only with --no-remove on a feature branch (not in_main, not on_target).- // When in_main or on_target, user is already in the destination directory.- let display_path = if !remove_effective && !in_main && !on_target {+ // Show path when user's shell won't be in the destination directory where hooks run.+ let display_path = if in_main || on_target {+ // User is already in the destination directory+ None+ } else if !remove_effective {+ // Worktree preserved — user's shell stays in feature worktreeSome(destination_path.as_path())} else {- None+ // Worktree removed — show path only if shell integration won't cd there+ crate::output::hooks_display_path(&destination_path)};execute_post_merge_commands(&ctx, &target_branch, None, display_path)?;}diff --git a/src/commands/worktree.rs b/src/commands/worktree.rsindex fa823e92b..671aba2a9 100644--- a/src/commands/worktree.rs+++ b/src/commands/worktree.rs@@ -832,7 +832,13 @@ impl<'a> CommandContext<'a> {}/// Spawn post-start commands in parallel as background processes (non-blocking)- pub fn spawn_post_start_commands(&self) -> anyhow::Result<()> {+ ///+ /// `display_path`: When `Some`, shows the path in hook announcements. Pass this when+ /// the user's shell won't be in the worktree (shell integration not active).+ pub fn spawn_post_start_commands(+ &self,+ display_path: Option<&std::path::Path>,+ ) -> anyhow::Result<()> {let project_config = self.repo.load_project_config()?;let commands = prepare_hook_commands(@@ -844,7 +850,7 @@ impl<'a> CommandContext<'a> {HookType::PostStart,&[],None,- None, // No path display - running in expected directory+ display_path,)?;spawn_hook_commands_background(self, commands, HookType::PostStart)diff --git a/src/main.rs b/src/main.rsindex 0a56085fd..b8c8f71cb 100644--- a/src/main.rs+++ b/src/main.rs@@ -1279,7 +1279,7 @@ fn main() {// Post-start runs only on creation (setup tasks)if matches!(&result, SwitchResult::Created { .. }) {- ctx.spawn_post_start_commands()?;+ ctx.spawn_post_start_commands(hooks_display_path.as_deref())?;}}diff --git a/src/output/global.rs b/src/output/global.rsindex ce7924ced..63486bb28 100644--- a/src/output/global.rs+++ b/src/output/global.rs@@ -276,6 +276,20 @@ pub fn is_shell_integration_active() -> bool {has_directive_file()}+/// Returns `Some(path)` when shell integration isn't active, `None` otherwise.+///+/// Use this to decide whether hook announcements should show "@ path".+/// When shell integration is active, the user's shell will cd to the path automatically,+/// so no annotation is needed. When inactive, showing the path helps users understand+/// where hooks are running.+pub fn hooks_display_path(path: &std::path::Path) -> Option<&std::path::Path> {+ if is_shell_integration_active() {+ None+ } else {+ Some(path)+ }+}+#[cfg(test)]mod tests {use super::*;diff --git a/src/output/handlers.rs b/src/output/handlers.rsindex 4c7b4cc51..f52245c94 100644--- a/src/output/handlers.rs+++ b/src/output/handlers.rs@@ -912,8 +912,8 @@ fn spawn_post_switch_after_remove(&repo_root,false, // force=false for CommandContext);- // No display_path needed - changed_directory is true, so user's shell IS going there- ctx.spawn_post_switch_commands(None)+ // Show path when shell integration isn't active — the cd directive won't take effect+ ctx.spawn_post_switch_commands(super::hooks_display_path(main_path))}/// Handle output for RemovedWorktree removaldiff --git a/src/output/mod.rs b/src/output/mod.rsindex 4349594da..72bf0d6ce 100644--- a/src/output/mod.rs+++ b/src/output/mod.rs@@ -31,8 +31,8 @@ pub mod handlers;// Re-export the public APIpub use global::{- blank, change_directory, execute, flush, is_shell_integration_active, print, stdout,- terminate_output,+ blank, change_directory, execute, flush, hooks_display_path, is_shell_integration_active,+ print, stdout, terminate_output,};// Re-export output handlerspub use handlers::{diff --git a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_failure.snap b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_failure.snapindex 61e001c1f..c6b040609 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_failure.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_failure.snap@@ -24,6 +24,7 @@ info:SOURCE_DATE_EPOCH: "1735776000"USERPROFILE: "[TEST_HOME]"WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"---success: false@@ -38,7 +39,7 @@ exit_code: 1[32m✓[39m [32mMerged to [1mmain[22m [90m(1 commit, 1 file, [32m+1[39m[39m[90m)[39m[39m[36m◎ Removing [1mfeature[22m worktree & branch in background (same commit as [1mmain[22m,[39m [2m_[22m[36m)[39m[2m○[22m Switched to worktree for [1mmain[22m @ [1m_REPO_[22m-[36m◎[39m [36mRunning post-merge project hook:[39m+[36m◎[39m [36mRunning post-merge project hook @ [1m_REPO_[22m:[39m[107m [0m [2m[0m[2m[34mexit[0m[2m 1[0m[33m▲[39m [33mCommand failed: exit status: 1[39m[31m✗[39m [31mpost-merge command failed: exit status: 1[39mdiff --git a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_named.snap b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_named.snapindex 8fabefd59..597b72765 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_named.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_named.snap@@ -24,6 +24,7 @@ info:SOURCE_DATE_EPOCH: "1735776000"USERPROFILE: "[TEST_HOME]"WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"---success: true@@ -38,7 +39,7 @@ exit_code: 0[32m✓[39m [32mMerged to [1mmain[22m [90m(1 commit, 1 file, [32m+1[39m[39m[90m)[39m[39m[36m◎ Removing [1mfeature[22m worktree & branch in background (same commit as [1mmain[22m,[39m [2m_[22m[36m)[39m[2m○[22m Switched to worktree for [1mmain[22m @ [1m_REPO_[22m-[36m◎[39m [36mRunning post-merge [1mproject:notify[22m:[39m+[36m◎[39m [36mRunning post-merge [1mproject:notify[22m @ [1m_REPO_[22m:[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Merge to main complete'[0m[2m [0m[2m[36m>[0m[2m notify.txt-[0m[36m◎[39m [36mRunning post-merge [1mproject:deploy[22m:[39m+[0m[36m◎[39m [36mRunning post-merge [1mproject:deploy[22m @ [1m_REPO_[22m:[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Deploying branch feature'[0m[2m [0m[2m[36m>[0m[2m deploy.txtdiff --git a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_success.snap b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_success.snapindex a8f6470ad..c298b2136 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_success.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_success.snap@@ -24,6 +24,7 @@ info:SOURCE_DATE_EPOCH: "1735776000"USERPROFILE: "[TEST_HOME]"WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"---success: true@@ -38,5 +39,5 @@ exit_code: 0[32m✓[39m [32mMerged to [1mmain[22m [90m(1 commit, 1 file, [32m+1[39m[39m[90m)[39m[39m[36m◎ Removing [1mfeature[22m worktree & branch in background (same commit as [1mmain[22m,[39m [2m_[22m[36m)[39m[2m○[22m Switched to worktree for [1mmain[22m @ [1m_REPO_[22m-[36m◎[39m [36mRunning post-merge project hook:[39m+[36m◎[39m [36mRunning post-merge project hook @ [1m_REPO_[22m:[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'merged feature to main'[0m[2m [0m[2m[36m>[0m[2m post-merge-ran.txtdiff --git a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_runs_with_nothing_to_merge.snap b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_runs_with_nothing_to_merge.snapindex 8545548e1..ff8b05a39 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_runs_with_nothing_to_merge.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_runs_with_nothing_to_merge.snap@@ -24,6 +24,7 @@ info:SOURCE_DATE_EPOCH: "1735776000"USERPROFILE: "[TEST_HOME]"WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"---success: true@@ -34,5 +35,5 @@ exit_code: 0[2m○[22m Already up to date with [1mmain[22m (no new commits, no rebase needed)[36m◎ Removing [1mfeature[22m worktree & branch in background (same commit as [1mmain[22m,[39m [2m_[22m[36m)[39m[2m○[22m Switched to worktree for [1mmain[22m @ [1m_REPO_[22m-[36m◎[39m [36mRunning post-merge project hook:[39m+[36m◎[39m [36mRunning post-merge project hook @ [1m_REPO_[22m:[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'post-merge ran'[0m[2m [0m[2m[36m>[0m[2m post-merge-ran.txtdiff --git a/tests/snapshots/integration__integration_tests__merge__readme_example_complex.snap b/tests/snapshots/integration__integration_tests__merge__readme_example_complex.snapindex f34538830..cc917544b 100644--- a/tests/snapshots/integration__integration_tests__merge__readme_example_complex.snap+++ b/tests/snapshots/integration__integration_tests__merge__readme_example_complex.snap@@ -24,6 +24,7 @@ info:SOURCE_DATE_EPOCH: "1735776000"USERPROFILE: "[TEST_HOME]"WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"---success: true@@ -68,7 +69,7 @@ test result: ok. 18 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; fin[32m✓[39m [32mMerged to [1mmain[22m [90m(1 commit, 3 files, [32m+33[39m[39m[90m)[39m[39m[36m◎ Removing [1mfeature-auth[22m worktree & branch in background (same commit as [1mmain[22m,[39m [2m_[22m[36m)[39m[2m○[22m Switched to worktree for [1mmain[22m @ [1m_REPO_[22m-[36m◎[39m [36mRunning post-merge [1mproject:install[22m:[39m+[36m◎[39m [36mRunning post-merge [1mproject:install[22m @ [1m_REPO_[22m:[39m[107m [0m [2m[0m[2m[34mcargo[0m[2m install [0m[2m[36m--path[0m[2m .[0m Installing worktrunk v0.1.0Compiling worktrunk v0.1.0diff --git a/tests/snapshots/integration__integration_tests__merge__readme_example_hooks_post_create.snap b/tests/snapshots/integration__integration_tests__merge__readme_example_hooks_post_create.snapindex d5ae62430..7d250c7b4 100644--- a/tests/snapshots/integration__integration_tests__merge__readme_example_hooks_post_create.snap+++ b/tests/snapshots/integration__integration_tests__merge__readme_example_hooks_post_create.snap@@ -41,5 +41,5 @@ exit_code: 0[32m✓[39m [32mCreated new worktree for [1mfeature-x[22m from [1mmain[22m @ [1m_REPO_.feature-x[22m[39m[33m▲[39m [33mCannot change directory — shell integration not installed[39m[2m↳[22m [2mTo enable automatic cd, run [90mwt config shell install[39m[22m-[36m◎[39m [36mRunning post-start [1mproject:dev[22m:[39m+[36m◎[39m [36mRunning post-start [1mproject:dev[22m @ [1m_REPO_.feature-x[22m:[39m[107m [0m [2m[0m[2m[34muv[0m[2m run devdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__both_create_and_start.snap b/tests/snapshots/integration__integration_tests__post_start_commands__both_create_and_start.snapindex c3a89cdc9..fb0ab5650 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__both_create_and_start.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__both_create_and_start.snap@@ -37,5 +37,5 @@ exit_code: 0[0m[32m✓[39m [32mCreated new worktree for [1mfeature[22m from [1mmain[22m @ [1m_REPO_.feature[22m[39m[33m▲[39m [33mCannot change directory — shell integration not installed[39m[2m↳[22m [2mTo enable automatic cd, run [90mwt config shell install[39m[22m-[36m◎[39m [36mRunning post-start [1mproject:server[22m:[39m+[36m◎[39m [36mRunning post-start [1mproject:server[22m @ [1m_REPO_.feature[22m:[39m[107m [0m [2m[0m[2m[34msleep[0m[2m 0.05 [0m[2m[36m&&[0m[2m [0m[2m[34mecho[0m[2m [0m[2m[32m'Server running'[0m[2m [0m[2m[36m>[0m[2m server.txtdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__execute_with_post_start.snap b/tests/snapshots/integration__integration_tests__post_start_commands__execute_with_post_start.snapindex 1be1a9572..680f90014 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__execute_with_post_start.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__execute_with_post_start.snap@@ -37,7 +37,7 @@ exit_code: 0[32m✓[39m [32mCreated new worktree for [1mfeature[22m from [1mmain[22m @ [1m_REPO_.feature[22m[39m[33m▲[39m [33mExecuting [1mecho 'Execute flag' > execute.txt[22m @ [1m_REPO_.feature[22m, but shell directory unchanged — shell integration not installed[39m[2m↳[22m [2mTo enable automatic cd, run [90mwt config shell install[39m[22m-[36m◎[39m [36mRunning post-start project hook:[39m+[36m◎[39m [36mRunning post-start project hook @ [1m_REPO_.feature[22m:[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Background task'[0m[2m [0m[2m[36m>[0m[2m background.txt[36m◎[39m [36mExecuting (--execute):[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Execute flag'[0m[2m [0m[2m[36m>[0m[2m execute.txtdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_complex_shell.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_complex_shell.snapindex caf05bd94..464bb9e26 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_complex_shell.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_complex_shell.snap@@ -35,7 +35,7 @@ exit_code: 0[32m✓[39m [32mCreated new worktree for [1mfeature[22m from [1mmain[22m @ [1m_REPO_.feature[22m[39m[33m▲[39m [33mCannot change directory — shell integration not installed[39m[2m↳[22m [2mTo enable automatic cd, run [90mwt config shell install[39m[22m-[36m◎[39m [36mRunning post-start project hook:[39m+[36m◎[39m [36mRunning post-start project hook @ [1m_REPO_.feature[22m:[39m[107m [0m [2m[0m[2m[34mecho[0m[2m 'line1[107m [0m [2m[0m[2m[34mline2[0m[2m[107m [0m [2m[0m[2m[34mline3[0m[2m' | grep line2 > filtered.txtdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_create_with_command.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_create_with_command.snapindex 45592413b..85ee6e7d8 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_create_with_command.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_create_with_command.snap@@ -35,5 +35,5 @@ exit_code: 0[32m✓[39m [32mCreated new worktree for [1mfeature[22m from [1mmain[22m @ [1m_REPO_.feature[22m[39m[33m▲[39m [33mCannot change directory — shell integration not installed[39m[2m↳[22m [2mTo enable automatic cd, run [90mwt config shell install[39m[22m-[36m◎[39m [36mRunning post-start project hook:[39m+[36m◎[39m [36mRunning post-start project hook @ [1m_REPO_.feature[22m:[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'POST-START-RAN'[0m[2m [0m[2m[36m>[0m[2m post_start_marker.txtdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_invalid_command.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_invalid_command.snapindex d55c600c8..7fafd468a 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_invalid_command.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_invalid_command.snap@@ -35,5 +35,5 @@ exit_code: 0[32m✓[39m [32mCreated new worktree for [1mfeature[22m from [1mmain[22m @ [1m_REPO_.feature[22m[39m[33m▲[39m [33mCannot change directory — shell integration not installed[39m[2m↳[22m [2mTo enable automatic cd, run [90mwt config shell install[39m[22m-[36m◎[39m [36mRunning post-start project hook:[39m+[36m◎[39m [36mRunning post-start project hook @ [1m_REPO_.feature[22m:[39m[107m [0m [2m[0m[2m[34mecho[0m[2m 'unclosed quotediff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_log_captures_output.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_log_captures_output.snapindex 2814f01d4..a9592e693 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_log_captures_output.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_log_captures_output.snap@@ -35,5 +35,5 @@ exit_code: 0[32m✓[39m [32mCreated new worktree for [1mfeature[22m from [1mmain[22m @ [1m_REPO_.feature[22m[39m[33m▲[39m [33mCannot change directory — shell integration not installed[39m[2m↳[22m [2mTo enable automatic cd, run [90mwt config shell install[39m[22m-[36m◎[39m [36mRunning post-start project hook:[39m+[36m◎[39m [36mRunning post-start project hook @ [1m_REPO_.feature[22m:[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'stdout output'[0m[2m [0m[2m[36m&&[0m[2m [0m[2m[34mecho[0m[2m [0m[2m[32m'stderr output'[0m[2m >&2diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiline_with_newlines.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiline_with_newlines.snapindex 436f1b6bb..aa8c31795 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiline_with_newlines.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiline_with_newlines.snap@@ -35,7 +35,7 @@ exit_code: 0[32m✓[39m [32mCreated new worktree for [1mfeature[22m from [1mmain[22m @ [1m_REPO_.feature[22m[39m[33m▲[39m [33mCannot change directory — shell integration not installed[39m[2m↳[22m [2mTo enable automatic cd, run [90mwt config shell install[39m[22m-[36m◎[39m [36mRunning post-start project hook:[39m+[36m◎[39m [36mRunning post-start project hook @ [1m_REPO_.feature[22m:[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'first line'[0m[2m [0m[2m[36m>[0m[2m multiline.txt[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'second line'[0m[2m [0m[2m[36m>>[0m[2m multiline.txt[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'third line'[0m[2m [0m[2m[36m>>[0m[2m multiline.txtdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiple_background.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiple_background.snapindex f6b99e916..3a360345a 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiple_background.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiple_background.snap@@ -35,7 +35,7 @@ exit_code: 0[32m✓[39m [32mCreated new worktree for [1mfeature[22m from [1mmain[22m @ [1m_REPO_.feature[22m[39m[33m▲[39m [33mCannot change directory — shell integration not installed[39m[2m↳[22m [2mTo enable automatic cd, run [90mwt config shell install[39m[22m-[36m◎[39m [36mRunning post-start [1mproject:task1[22m:[39m+[36m◎[39m [36mRunning post-start [1mproject:task1[22m @ [1m_REPO_.feature[22m:[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Task 1 running'[0m[2m [0m[2m[36m>[0m[2m task1.txt-[36m◎[39m [36mRunning post-start [1mproject:task2[22m:[39m+[36m◎[39m [36mRunning post-start [1mproject:task2[22m @ [1m_REPO_.feature[22m:[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Task 2 running'[0m[2m [0m[2m[36m>[0m[2m task2.txtdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_separate_logs.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_separate_logs.snapindex 7b1388b31..554891b14 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_separate_logs.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_separate_logs.snap@@ -35,9 +35,9 @@ exit_code: 0[32m✓[39m [32mCreated new worktree for [1mfeature[22m from [1mmain[22m @ [1m_REPO_.feature[22m[39m[33m▲[39m [33mCannot change directory — shell integration not installed[39m[2m↳[22m [2mTo enable automatic cd, run [90mwt config shell install[39m[22m-[36m◎[39m [36mRunning post-start [1mproject:task1[22m:[39m+[36m◎[39m [36mRunning post-start [1mproject:task1[22m @ [1m_REPO_.feature[22m:[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'TASK1_OUTPUT'[0m[2m-[36m◎[39m [36mRunning post-start [1mproject:task2[22m:[39m+[36m◎[39m [36mRunning post-start [1mproject:task2[22m @ [1m_REPO_.feature[22m:[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'TASK2_OUTPUT'[0m[2m-[36m◎[39m [36mRunning post-start [1mproject:task3[22m:[39m+[36m◎[39m [36mRunning post-start [1mproject:task3[22m @ [1m_REPO_.feature[22m:[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'TASK3_OUTPUT'[0m[2mdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_single_background.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_single_background.snapindex 21d9fb81c..f5ace790b 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_single_background.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_single_background.snap@@ -35,5 +35,5 @@ exit_code: 0[32m✓[39m [32mCreated new worktree for [1mfeature[22m from [1mmain[22m @ [1m_REPO_.feature[22m[39m[33m▲[39m [33mCannot change directory — shell integration not installed[39m[2m↳[22m [2mTo enable automatic cd, run [90mwt config shell install[39m[22m-[36m◎[39m [36mRunning post-start project hook:[39m+[36m◎[39m [36mRunning post-start project hook @ [1m_REPO_.feature[22m:[39m[107m [0m [2m[0m[2m[34msleep[0m[2m 0.1 [0m[2m[36m&&[0m[2m [0m[2m[34mecho[0m[2m [0m[2m[32m'Background task done'[0m[2m [0m[2m[36m>[0m[2m background.txtdiff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_and_project_post_start.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_and_project_post_start.snapindex a556b50f6..afbd949ec 100644--- a/tests/snapshots/integration__integration_tests__user_hooks__user_and_project_post_start.snap+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_and_project_post_start.snap@@ -35,7 +35,7 @@ exit_code: 0[32m✓[39m [32mCreated new worktree for [1mfeature[22m from [1mmain[22m @ [1m_REPO_.feature[22m[39m[33m▲[39m [33mCannot change directory — shell integration not installed[39m[2m↳[22m [2mTo enable automatic cd, run [90mwt config shell install[39m[22m-[36m◎[39m [36mRunning post-start [1muser:bg[22m:[39m+[36m◎[39m [36mRunning post-start [1muser:bg[22m @ [1m_REPO_.feature[22m:[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'USER_POST_START'[0m[2m [0m[2m[36m>[0m[2m user_bg.txt-[36m◎[39m [36mRunning post-start project hook:[39m+[36m◎[39m [36mRunning post-start project hook @ [1m_REPO_.feature[22m:[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'PROJECT_POST_START'[0m[2m [0m[2m[36m>[0m[2m project_bg.txtdiff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_executes.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_executes.snapindex 84055507e..7df259b4f 100644--- a/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_executes.snap+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_executes.snap@@ -35,5 +35,5 @@ exit_code: 0[32m✓[39m [32mCreated new worktree for [1mfeature[22m from [1mmain[22m @ [1m_REPO_.feature[22m[39m[33m▲[39m [33mCannot change directory — shell integration not installed[39m[2m↳[22m [2mTo enable automatic cd, run [90mwt config shell install[39m[22m-[36m◎[39m [36mRunning post-start [1muser:bg[22m:[39m+[36m◎[39m [36mRunning post-start [1muser:bg[22m @ [1m_REPO_.feature[22m:[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'USER_POST_START_RAN'[0m[2m [0m[2m[36m>[0m[2m user_bg_marker.txt