Skip to content

Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows

fix(output): Prevent bash color bleed

Maximilian Roos9761c4dc7316
diff --git a/CLAUDE.md b/CLAUDE.md
index 00c16d172..966e5bf25 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -204,6 +204,18 @@ let warning_bold = WARNING.bold();
"{WARNING}Text with {warning_bold}composed{warning_bold:#} styles{WARNING:#}"
```
+**CRITICAL: Resetting all styles** - To reset ALL ANSI attributes at once, use `anstyle::Reset`, NOT `{:#}` on an empty `Style`:
+
+```rust
+// ❌ BAD - produces empty string, NO reset!
+output.push_str(&format!("{:#}", Style::new()));
+
+// ✅ GOOD - produces \x1b[0m reset code
+output.push_str(&format!("{}", anstyle::Reset));
+```
+
+**Why this matters:** `{:#}` only resets when used on a style with attributes. Using it on `Style::new()` (empty style) produces an empty string, causing color bleeding into subsequent output. This was the root cause of color leaking from gutter-formatted commands into child process output.
+
### Information Hierarchy & Styling
**Principle: Bold what answers the user's question, dim what provides context.**
diff --git a/src/styling.rs b/src/styling.rs
index 097241532..1eaec6e87 100644
--- a/src/styling.rs
+++ b/src/styling.rs
@@ -419,13 +419,13 @@ pub fn format_bash_with_gutter(content: &str, left_margin: &str) -> String {
}
HighlightEvent::HighlightEnd => {
// End of highlighted region - reset style
- output.push_str(&format!("{:#}", Style::new()));
+ output.push_str(&format!("{}", anstyle::Reset));
}
}
}
// Ensure all styles are reset at end of line to prevent leaking into child process output
- output.push_str(&format!("{:#}", Style::new()));
+ output.push_str(&format!("{}", anstyle::Reset));
output.push('\n');
}
@@ -827,4 +827,67 @@ command = "npm install"
  includes proper token rotation and expiration handling.
");
}
+
+ #[test]
+ fn test_bash_gutter_formatting_ends_with_reset() {
+ // Test that bash gutter formatting properly resets colors at the end of each line
+ // to prevent color bleeding into subsequent output (like child process output)
+ let command = "pre-commit run --all-files";
+ let result = format_bash_with_gutter(command, "");
+
+ // The output should end with ANSI reset code followed by newline
+ // ANSI reset is \x1b[0m (ESC[0m)
+ assert!(
+ result.ends_with("\x1b[0m\n"),
+ "Bash gutter formatting should end with ANSI reset code followed by newline, got: {:?}",
+ result.chars().rev().take(20).collect::<String>()
+ );
+
+ // Verify the reset appears at the end of EVERY line (for multi-line commands)
+ let multi_line_command = "npm install && \\\n npm run build";
+ let multi_result = format_bash_with_gutter(multi_line_command, "");
+
+ // Each line should end with reset code
+ for line in multi_result.lines() {
+ if !line.is_empty() {
+ // Check that line contains a reset code somewhere
+ // (The actual position depends on the highlighting, but it should be present)
+ assert!(
+ line.contains("\x1b[0m"),
+ "Each line should contain ANSI reset code, line: {:?}",
+ line
+ );
+ }
+ }
+
+ // Most importantly: the final output should end with reset + newline
+ assert!(
+ multi_result.ends_with("\x1b[0m\n"),
+ "Multi-line bash gutter formatting should end with ANSI reset + newline"
+ );
+ }
+
+ #[test]
+ fn test_reset_code_behavior() {
+ // IMPORTANT: {:#} on Style::new() produces an EMPTY STRING, not a reset!
+ // This is the root cause of color bleeding bugs.
+ let style_reset = format!("{:#}", Style::new());
+ assert_eq!(
+ style_reset, "",
+ "Style::new() with {{:#}} produces empty string (this is why we had color leaking!)"
+ );
+
+ // The correct way to get a reset code is anstyle::Reset
+ let anstyle_reset = format!("{}", anstyle::Reset);
+ assert_eq!(
+ anstyle_reset, "\x1b[0m",
+ "anstyle::Reset produces proper ESC[0m reset code"
+ );
+
+ // Document the fix: always use anstyle::Reset, never {:#} on Style::new()
+ assert_ne!(
+ style_reset, anstyle_reset,
+ "Style::new() and anstyle::Reset are NOT equivalent - always use anstyle::Reset"
+ );
+ }
}
diff --git a/tests/integration_tests/configure_shell.rs b/tests/integration_tests/configure_shell.rs
index b47d7aed2..295627e72 100644
--- a/tests/integration_tests/configure_shell.rs
+++ b/tests/integration_tests/configure_shell.rs
@@ -33,7 +33,7 @@ fn test_configure_shell_with_yes() {
exit_code: 0
----- stdout -----
Added zsh [TEMP_HOME]/.zshrc
-   if command -v wt >/dev/null 2>&1; then eval "$(wt init zsh)"; fi
+   if command -v wt >/dev/null 2>&1; then eval "$(wt init zsh)"; fi
✅ Configured 1 shell
@@ -78,7 +78,7 @@ fn test_configure_shell_specific_shell() {
exit_code: 0
----- stdout -----
Added zsh [TEMP_HOME]/.zshrc
-   if command -v wt >/dev/null 2>&1; then eval "$(wt init zsh)"; fi
+   if command -v wt >/dev/null 2>&1; then eval "$(wt init zsh)"; fi
✅ Configured 1 shell
@@ -164,7 +164,7 @@ fn test_configure_shell_fish() {
exit_code: 0
----- stdout -----
Created fish [TEMP_HOME]/.config/fish/conf.d/wt.fish
-   if type -q wt; wt init fish | source; end
+   if type -q wt; wt init fish | source; end
✅ Configured 1 shell
@@ -258,9 +258,9 @@ fn test_configure_shell_multiple_configs() {
exit_code: 0
----- stdout -----
Added bash [TEMP_HOME]/.bash_profile
-   if command -v wt >/dev/null 2>&1; then eval "$(wt init bash)"; fi
+   if command -v wt >/dev/null 2>&1; then eval "$(wt init bash)"; fi
Added zsh [TEMP_HOME]/.zshrc
-   if command -v wt >/dev/null 2>&1; then eval "$(wt init zsh)"; fi
+   if command -v wt >/dev/null 2>&1; then eval "$(wt init zsh)"; fi
✅ Configured 2 shells
@@ -326,9 +326,9 @@ fn test_configure_shell_mixed_states() {
exit_code: 0
----- stdout -----
Already configured bash [TEMP_HOME]/.bash_profile
-   if command -v wt >/dev/null 2>&1; then eval "$(wt init bash)"; fi
+   if command -v wt >/dev/null 2>&1; then eval "$(wt init bash)"; fi
Added zsh [TEMP_HOME]/.zshrc
-   if command -v wt >/dev/null 2>&1; then eval "$(wt init zsh)"; fi
+   if command -v wt >/dev/null 2>&1; then eval "$(wt init zsh)"; fi
✅ Configured 1 shell
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__fish_multiline_command_execution.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__fish_multiline_command_execution.snap
index 5d0d538d0..acd488a21 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__fish_multiline_command_execution.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__fish_multiline_command_execution.snap
@@ -4,7 +4,7 @@ expression: output.normalized().as_ref()
---
✅ Created new worktree for fish-multiline, changed directory to [TMPDIR]/test-repo.fish-multiline
🔄 Executing (--execute):
-  echo 'line 1'; echo 'line 2'; echo 'line 3'
+  echo 'line 1'; echo 'line 2'; echo 'line 3'
line 1
line 2
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__fish_wrapper_preserves_progress_messages.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__fish_wrapper_preserves_progress_messages.snap
index a7793ecd5..3c8ad5057 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__fish_wrapper_preserves_progress_messages.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__fish_wrapper_preserves_progress_messages.snap
@@ -4,4 +4,4 @@ expression: output.normalized().as_ref()
---
✅ Created new worktree for fish-bg, changed directory to [TMPDIR]/test-repo.fish-bg
🔄 Running post-start:
-  echo 'fish background task'
+  echo 'fish background task'
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_bash.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_bash.snap
index 77e5dc5a4..7c83646d0 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_bash.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_bash.snap
@@ -5,12 +5,12 @@ expression: output.normalized().as_ref()
🔄 Rebasing onto main...
✅ Rebased onto main
🔄 Running pre-merge: format
-  echo '✓ Code formatting check passed'
+  echo '✓ Code formatting check passed'
✓ Code formatting check passed
🔄 Running pre-merge: test
-  echo '✗ Test suite failed: 3 tests failing' && exit 1
+  echo '✗ Test suite failed: 3 tests failing' && exit 1
✗ Test suite failed: 3 tests failing
❌ pre-merge command failed: test
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_fish.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_fish.snap
index 503cc5aba..fb3a7bd64 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_fish.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_fish.snap
@@ -5,11 +5,11 @@ expression: output.normalized().as_ref()
🔄 Rebasing onto main...
✅ Rebased onto main
🔄 Running pre-merge: format
-  echo '✓ Code formatting check passed'
+  echo '✓ Code formatting check passed'
✓ Code formatting check passed
🔄 Running pre-merge: test
-  echo '✗ Test suite failed: 3 tests failing' && exit 1
+  echo '✗ Test suite failed: 3 tests failing' && exit 1
✗ Test suite failed: 3 tests failing
❌ pre-merge command failed: test
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_zsh.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_zsh.snap
index f24a45645..5176685aa 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_zsh.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_zsh.snap
@@ -12,8 +12,8 @@ Command failed with exit code: exit status: 1
🔄 Rebasing onto main...
✅ Rebased onto main
🔄 Running pre-merge: format
-  echo '✓ Code formatting check passed'
+  echo '✓ Code formatting check passed'
🔄 Running pre-merge: test
-  echo '✗ Test suite failed: 3 tests failing' && exit 1
+  echo '✗ Test suite failed: 3 tests failing' && exit 1
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_bash.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_bash.snap
index b1f73f49a..4b9b85053 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_bash.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_bash.snap
@@ -5,17 +5,17 @@ expression: output.normalized().as_ref()
🔄 Rebasing onto main...
✅ Rebased onto main
🔄 Running pre-merge: format
-  echo '✓ Code formatting check passed'
+  echo '✓ Code formatting check passed'
✓ Code formatting check passed
🔄 Running pre-merge: lint
-  echo '✓ Linting passed - no warnings'
+  echo '✓ Linting passed - no warnings'
✓ Linting passed - no warnings
🔄 Running pre-merge: test
-  echo '✓ All 47 tests passed in 2.3s'
+  echo '✓ All 47 tests passed in 2.3s'
✓ All 47 tests passed in 2.3s
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_fish.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_fish.snap
index e6fd232e6..656ba1c6f 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_fish.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_fish.snap
@@ -1,19 +1,20 @@
---
source: tests/integration_tests/shell_wrapper.rs
+assertion_line: 637
expression: output.normalized().as_ref()
---
🔄 Rebasing onto main...
✅ Rebased onto main
🔄 Running pre-merge: format
-  echo '✓ Code formatting check passed'
+  echo '✓ Code formatting check passed'
✓ Code formatting check passed
🔄 Running pre-merge: lint
-  echo '✓ Linting passed - no warnings'
+  echo '✓ Linting passed - no warnings'
✓ Linting passed - no warnings
🔄 Running pre-merge: test
-  echo '✓ All 47 tests passed in 2.3s'
+  echo '✓ All 47 tests passed in 2.3s'
✓ All 47 tests passed in 2.3s
🔄 Merging 1 commit to main @ d067f01
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_zsh.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_zsh.snap
index e99011fa0..945d9b978 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_zsh.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_zsh.snap
@@ -8,15 +8,15 @@ expression: output.normalized().as_ref()
🔄 Rebasing onto main...
✅ Rebased onto main
🔄 Running pre-merge: format
-  echo '✓ Code formatting check passed'
+  echo '✓ Code formatting check passed'
🔄 Running pre-merge: lint
-  echo '✓ Linting passed - no warnings'
+  echo '✓ Linting passed - no warnings'
🔄 Running pre-merge: test
-  echo '✓ All 47 tests passed in 2.3s'
+  echo '✓ All 47 tests passed in 2.3s'
🔄 Merging 1 commit to main @ d067f01
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_execute.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_execute.snap
index 0f2f4a876..736914f16 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_execute.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_execute.snap
@@ -4,6 +4,6 @@ expression: output.normalized().as_ref()
---
✅ Created new worktree for test-exec, changed directory to [TMPDIR]/test-repo.test-exec
🔄 Executing (--execute):
-  echo executed
+  echo executed
executed
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_execute_through_wrapper.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_execute_through_wrapper.snap
index 0f2f4a876..736914f16 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_execute_through_wrapper.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_execute_through_wrapper.snap
@@ -4,6 +4,6 @@ expression: output.normalized().as_ref()
---
✅ Created new worktree for test-exec, changed directory to [TMPDIR]/test-repo.test-exec
🔄 Executing (--execute):
-  echo executed
+  echo executed
executed
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_hooks_bash.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_hooks_bash.snap
index 8b62d3de3..e5eaccf20 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_hooks_bash.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_hooks_bash.snap
@@ -3,18 +3,18 @@ source: tests/integration_tests/shell_wrapper.rs
expression: output.normalized().as_ref()
---
🔄 Running post-create: 1
-  echo 'Installing dependencies...'
+  echo 'Installing dependencies...'
Installing dependencies...
🔄 Running post-create: 2
-  echo 'Building project...'
+  echo 'Building project...'
Building project...
✅ Created new worktree for feature-hooks, changed directory to [TMPDIR]/test-repo.feature-hooks
🔄 Running post-start: server
-  echo 'Starting dev server on port 3000'
+  echo 'Starting dev server on port 3000'
🔄 Running post-start: watch
-  echo 'Watching for file changes'
+  echo 'Watching for file changes'
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_hooks_zsh.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_hooks_zsh.snap
index abd963ade..b4332450f 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_hooks_zsh.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_hooks_zsh.snap
@@ -5,16 +5,16 @@ expression: output.normalized().as_ref()
Installing dependencies...
Building project...
🔄 Running post-create: 1
-  echo 'Installing dependencies...'
+  echo 'Installing dependencies...'
🔄 Running post-create: 2
-  echo 'Building project...'
+  echo 'Building project...'
✅ Created new worktree for feature-hooks, changed directory to [TMPDIR]/test-repo.feature-hooks
🔄 Running post-start: server
-  echo 'Starting dev server on port 3000'
+  echo 'Starting dev server on port 3000'
🔄 Running post-start: watch
-  echo 'Watching for file changes'
+  echo 'Watching for file changes'
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_post_start_command_no_directive_leak.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_post_start_command_no_directive_leak.snap
index 720dea4e7..203740655 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_post_start_command_no_directive_leak.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_post_start_command_no_directive_leak.snap
@@ -4,4 +4,4 @@ expression: output.normalized().as_ref()
---
✅ Created new worktree for feature-with-hooks, changed directory to [TMPDIR]/test-repo.feature-with-hooks
🔄 Running post-start:
-  echo 'test command executed'
+  echo 'test command executed'
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__wrapper_preserves_progress_messages.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__wrapper_preserves_progress_messages.snap
index f11ca6c5f..bfeb49f74 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__wrapper_preserves_progress_messages.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__wrapper_preserves_progress_messages.snap
@@ -4,4 +4,4 @@ expression: output.normalized().as_ref()
---
✅ Created new worktree for feature-bg, changed directory to [TMPDIR]/test-repo.feature-bg
🔄 Running post-start:
-  echo 'background task'
+  echo 'background task'
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.snap
index 80fd8e40a..0e41e9ba8 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
@@ -17,7 +17,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmprPSs36/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpptr827/test-config.toml
---
success: true
exit_code: 0
@@ -37,7 +37,7 @@ exit_code: 0
✅ Returned to primary at [REPO]
🔄 Running post-merge:
-  exit 1
+  exit 1
🟡 Command failed: Command failed with exit code: exit status: 1
diff --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.snap
index 760ae1454..e8add9023 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
@@ -17,7 +17,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpxc7RHg/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpGWnwYn/test-config.toml
---
success: true
exit_code: 0
@@ -37,10 +37,10 @@ exit_code: 0
✅ Returned to primary at [REPO]
🔄 Running post-merge: deploy
-  echo 'Deploying branch feature' > deploy.txt
+  echo 'Deploying branch feature' > deploy.txt
🔄 Running post-merge: notify
-  echo 'Merge to main complete' > notify.txt
+  echo 'Merge to main complete' > notify.txt
----- stderr -----
diff --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.snap
index ba9779b93..72829052e 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
@@ -17,7 +17,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpGGTD8y/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpKEEEAG/test-config.toml
---
success: true
exit_code: 0
@@ -37,7 +37,7 @@ exit_code: 0
✅ Returned to primary at [REPO]
🔄 Running post-merge:
-  echo 'merged feature to main' > post-merge-ran.txt
+  echo 'merged feature to main' > post-merge-ran.txt
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_combined_output.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_combined_output.snap
index 9211d181a..eb81a6524 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_combined_output.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_combined_output.snap
@@ -7,12 +7,12 @@ Exit code: 0
🔄 Rebasing onto main...
✅ Rebased onto main
🔄 Running pre-merge: first
-  echo 'STDOUT-FROM-FIRST' && echo 'STDERR-FROM-FIRST' >&2
+  echo 'STDOUT-FROM-FIRST' && echo 'STDERR-FROM-FIRST' >&2
STDOUT-FROM-FIRST
STDERR-FROM-FIRST
🔄 Running pre-merge: second
-  echo 'STDOUT-FROM-SECOND' && echo 'STDERR-FROM-SECOND' >&2
+  echo 'STDOUT-FROM-SECOND' && echo 'STDERR-FROM-SECOND' >&2
STDOUT-FROM-SECOND
STDERR-FROM-SECOND
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_failure.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_failure.snap
index 33c5f644e..04fff9ee8 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_failure.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_failure.snap
@@ -17,7 +17,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp1GXQ92/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp9HHF8C/test-config.toml
---
success: false
exit_code: 1
@@ -26,7 +26,7 @@ exit_code: 1
🔄 Rebasing onto main...
✅ Rebased onto main
🔄 Running pre-merge:
-  exit 1
+  exit 1
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_named.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_named.snap
index 60326e08f..59d473dc3 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_named.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_named.snap
@@ -17,7 +17,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpwVFrLQ/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpibRGV7/test-config.toml
---
success: true
exit_code: 0
@@ -26,13 +26,13 @@ exit_code: 0
🔄 Rebasing onto main...
✅ Rebased onto main
🔄 Running pre-merge: format
-  exit 0
+  exit 0
🔄 Running pre-merge: lint
-  exit 0
+  exit 0
🔄 Running pre-merge: test
-  exit 0
+  exit 0
🔄 Merging 1 commit to main @ [SHA]
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_stdout_stderr_ordering.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_stdout_stderr_ordering.snap
index 8bec17921..b25a7da92 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_stdout_stderr_ordering.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_stdout_stderr_ordering.snap
@@ -17,7 +17,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpusbLYb/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpVzGbNN/test-config.toml
---
success: true
exit_code: 0
@@ -26,10 +26,10 @@ exit_code: 0
🔄 Rebasing onto main...
✅ Rebased onto main
🔄 Running pre-merge: check1
-  [PROJECT_ROOT]/tests/fixtures/mixed-output.sh check1 3
+  [PROJECT_ROOT]/tests/fixtures/mixed-output.sh check1 3
🔄 Running pre-merge: check2
-  [PROJECT_ROOT]/tests/fixtures/mixed-output.sh check2 3
+  [PROJECT_ROOT]/tests/fixtures/mixed-output.sh check2 3
🔄 Merging 1 commit to main @ [SHA]
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_success.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_success.snap
index a1d3a5eb2..e7127994e 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_success.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_success.snap
@@ -17,7 +17,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpih5fiP/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp6PQ8BW/test-config.toml
---
success: true
exit_code: 0
@@ -26,7 +26,7 @@ exit_code: 0
🔄 Rebasing onto main...
✅ Rebased onto main
🔄 Running pre-merge:
-  exit 0
+  exit 0
🔄 Merging 1 commit to main @ [SHA]
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_squash_command_failure.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_squash_command_failure.snap
index f73aa91f9..09a485efd 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_squash_command_failure.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_squash_command_failure.snap
@@ -17,13 +17,13 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpX7kAU7/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpYJX0p5/test-config.toml
---
success: false
exit_code: 1
----- stdout -----
🔄 Running pre-squash:
-  exit 1
+  exit 1
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_squash_command_success.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_squash_command_success.snap
index dc8533d06..4a483219c 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_squash_command_success.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_squash_command_success.snap
@@ -17,13 +17,13 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpX4nX8J/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpSOWdk0/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
🔄 Running pre-squash:
-  echo 'Pre-squash check passed'
+  echo 'Pre-squash check passed'
💡 Only 1 commit since main - no squashing needed
🔄 Rebasing onto main...
diff --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.snap
index ddf1c275f..bf4e32946 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
@@ -17,19 +17,19 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpLfE81d/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpoL47a8/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
🔄 Running post-create:
-  echo 'Setup done' > setup.txt
+  echo 'Setup done' > setup.txt
✅ Created new worktree for feature at [REPO].feature
To enable automatic cd, run: wt config shell
🔄 Running post-start: server
-  sleep 0.5 && echo 'Server running' > server.txt
+  sleep 0.5 && echo 'Server running' > server.txt
----- stderr -----
diff --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.snap
index 471d49e19..dc0797ef6 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
@@ -19,17 +19,17 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpdgWPLD/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpcYBzHx/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
✅ Created new worktree for feature at [REPO].feature
🔄 Executing (--execute):
-  echo 'Execute flag' > execute.txt
+  echo 'Execute flag' > execute.txt
🔄 Running post-start:
-  echo 'Background task' > background.txt
+  echo 'Background task' > background.txt
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_failing_command.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_failing_command.snap
index 83a3baeab..10e52eaa0 100644
--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_failing_command.snap
+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_failing_command.snap
@@ -17,13 +17,13 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpEzKGqv/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpaCeFSo/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
🔄 Running post-create:
-  exit 1
+  exit 1
🟡 Command failed: Command failed with exit code: exit status: 1
✅ Created new worktree for feature at [REPO].feature
diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_multiline_control_structure.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_multiline_control_structure.snap
index c06498ebf..bf1d92622 100644
--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_multiline_control_structure.snap
+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_multiline_control_structure.snap
@@ -17,17 +17,17 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpSK4rIE/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpk5Ku9g/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
🔄 Running post-create:
-  if [ ! -f test.txt ]; then
-  echo 'File does not exist' > result.txt
-  else
-  echo 'File exists' > result.txt
-  fi
+  if [ ! -f test.txt ]; then
+  echo 'File does not exist' > result.txt
+  else
+  echo 'File exists' > result.txt
+  fi
✅ Created new worktree for feature at [REPO].feature
diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_multiple_commands_array.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_multiple_commands_array.snap
index 83c6e97aa..cfeaeccca 100644
--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_multiple_commands_array.snap
+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_multiple_commands_array.snap
@@ -17,16 +17,16 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp6BSBvR/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpXvo2gv/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
🔄 Running post-create: 1
-  echo 'First'
+  echo 'First'
🔄 Running post-create: 2
-  echo 'Second'
+  echo 'Second'
✅ Created new worktree for feature at [REPO].feature
diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_named_commands.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_named_commands.snap
index d7dcd466d..7c5296ae2 100644
--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_named_commands.snap
+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_named_commands.snap
@@ -17,16 +17,16 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp5593R7/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpzimn1l/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
🔄 Running post-create: install
-  echo 'Installing deps'
+  echo 'Installing deps'
🔄 Running post-create: setup
-  echo 'Running setup'
+  echo 'Running setup'
✅ Created new worktree for feature at [REPO].feature
diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_single_command.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_single_command.snap
index bf0538d28..5bae0a15f 100644
--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_single_command.snap
+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_single_command.snap
@@ -17,13 +17,13 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpxfYzYL/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpE64Nvf/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
🔄 Running post-create:
-  echo 'Setup complete'
+  echo 'Setup complete'
✅ Created new worktree for feature at [REPO].feature
diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_template_expansion.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_template_expansion.snap
index 0ee8c5064..7c15f1d37 100644
--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_template_expansion.snap
+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_template_expansion.snap
@@ -17,22 +17,22 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpv6ksxe/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp7ZuRfi/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
🔄 Running post-create: 1
-  echo 'Repo: test-repo' > info.txt
+  echo 'Repo: test-repo' > info.txt
🔄 Running post-create: 2
-  echo 'Branch: feature-test' >> info.txt
+  echo 'Branch: feature-test' >> info.txt
🔄 Running post-create: 3
-  echo 'Worktree: [REPO].feature-test' >> info.txt
+  echo 'Worktree: [REPO].feature-test' >> info.txt
🔄 Running post-create: 4
-  echo 'Root: [REPO]' >> info.txt
+  echo 'Root: [REPO]' >> info.txt
✅ Created new worktree for feature/test at [REPO].feature-test
diff --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.snap
index a437306c4..041b8dae7 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
@@ -17,7 +17,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmppEKpc3/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpVOqFcG/test-config.toml
---
success: true
exit_code: 0
@@ -26,9 +26,9 @@ exit_code: 0
To enable automatic cd, run: wt config shell
🔄 Running post-start:
-  echo 'line1
-  line2
-  line3' | grep line2 > filtered.txt
+  echo 'line1
+  line2
+  line3' | grep line2 > filtered.txt
----- stderr -----
diff --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.snap
index 5ced16d31..83eba7f28 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
@@ -17,7 +17,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpuuffeH/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp22tMXH/test-config.toml
---
success: true
exit_code: 0
@@ -26,7 +26,7 @@ exit_code: 0
To enable automatic cd, run: wt config shell
🔄 Running post-start:
-  echo 'unclosed quote
+  echo 'unclosed quote
----- stderr -----
diff --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.snap
index 2d78a0ef2..2ea8f296e 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
@@ -17,7 +17,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpcKjthE/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpN7reqi/test-config.toml
---
success: true
exit_code: 0
@@ -26,7 +26,7 @@ exit_code: 0
To enable automatic cd, run: wt config shell
🔄 Running post-start:
-  echo 'stdout output' && echo 'stderr output' >&2
+  echo 'stdout output' && echo 'stderr output' >&2
----- stderr -----
diff --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.snap
index f3ff79ccc..1d66410d3 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
@@ -17,7 +17,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp1qmdzg/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpbwF5AM/test-config.toml
---
success: true
exit_code: 0
@@ -26,9 +26,9 @@ exit_code: 0
To enable automatic cd, run: wt config shell
🔄 Running post-start:
-  echo 'first line' > multiline.txt
-  echo 'second line' >> multiline.txt
-  echo 'third line' >> multiline.txt
+  echo 'first line' > multiline.txt
+  echo 'second line' >> multiline.txt
+  echo 'third line' >> multiline.txt
----- stderr -----
diff --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.snap
index b9c90e90c..a28eb4203 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
@@ -17,7 +17,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpL1QZ4b/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpKRAW1U/test-config.toml
---
success: true
exit_code: 0
@@ -26,10 +26,10 @@ exit_code: 0
To enable automatic cd, run: wt config shell
🔄 Running post-start: task1
-  echo 'Task 1 running' > task1.txt
+  echo 'Task 1 running' > task1.txt
🔄 Running post-start: task2
-  echo 'Task 2 running' > task2.txt
+  echo 'Task 2 running' > task2.txt
----- stderr -----
diff --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.snap
index 1c544b483..01e3f8e89 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
@@ -17,7 +17,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpyBOrPy/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpHGYMBC/test-config.toml
---
success: true
exit_code: 0
@@ -26,13 +26,13 @@ exit_code: 0
To enable automatic cd, run: wt config shell
🔄 Running post-start: task1
-  echo 'TASK1_OUTPUT'
+  echo 'TASK1_OUTPUT'
🔄 Running post-start: task2
-  echo 'TASK2_OUTPUT'
+  echo 'TASK2_OUTPUT'
🔄 Running post-start: task3
-  echo 'TASK3_OUTPUT'
+  echo 'TASK3_OUTPUT'
----- stderr -----
diff --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.snap
index 281825ab6..e146b7180 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
@@ -17,7 +17,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpJ1CnZX/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpF06YU8/test-config.toml
---
success: true
exit_code: 0
@@ -26,7 +26,7 @@ exit_code: 0
To enable automatic cd, run: wt config shell
🔄 Running post-start:
-  sleep 1 && echo 'Background task done' > background.txt
+  sleep 1 && echo 'Background task done' > background.txt
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_execute_creates_file.snap b/tests/snapshots/integration__integration_tests__switch__switch_execute_creates_file.snap
index 913be45a0..33a0652fc 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_execute_creates_file.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_execute_creates_file.snap
@@ -19,14 +19,14 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpOriKcx/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpu5XDIG/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
✅ Created new worktree for file-test at [REPO].file-test
🔄 Executing (--execute):
-  echo 'test content' > test.txt
+  echo 'test content' > test.txt
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_execute_existing.snap b/tests/snapshots/integration__integration_tests__switch__switch_execute_existing.snap
index 2bc95d1c2..911c076e2 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_execute_existing.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_execute_existing.snap
@@ -18,14 +18,14 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpLbvJBO/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpk1ctcu/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
✅ Switched to worktree for existing-exec at [WORKTREE_EXISTING_EXEC]
🔄 Executing (--execute):
-  echo 'existing worktree' > existing.txt
+  echo 'existing worktree' > existing.txt
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_execute_failure.snap b/tests/snapshots/integration__integration_tests__switch__switch_execute_failure.snap
index f98b0f6cf..141927a03 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_execute_failure.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_execute_failure.snap
@@ -19,14 +19,14 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmppWjmaP/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpkVljqz/test-config.toml
---
success: false
exit_code: 1
----- stdout -----
✅ Created new worktree for fail-test at [REPO].fail-test
🔄 Executing (--execute):
-  exit 1
+  exit 1
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_execute_multiline.snap b/tests/snapshots/integration__integration_tests__switch__switch_execute_multiline.snap
index 0f2a2a4be..24666b440 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_execute_multiline.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_execute_multiline.snap
@@ -19,16 +19,16 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpyX9jOe/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpT98uHB/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
✅ Created new worktree for multiline-test at [REPO].multiline-test
🔄 Executing (--execute):
-  echo 'line1'
-  echo 'line2'
-  echo 'line3'
+  echo 'line1'
+  echo 'line2'
+  echo 'line3'
line1
line2
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_execute_success.snap b/tests/snapshots/integration__integration_tests__switch__switch_execute_success.snap
index f9c568529..5f85bd270 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_execute_success.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_execute_success.snap
@@ -19,14 +19,14 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpmZfgam/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpsRtxi3/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
✅ Created new worktree for exec-test at [REPO].exec-test
🔄 Executing (--execute):
-  echo 'test output'
+  echo 'test output'
test output
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_internal_with_execute.snap b/tests/snapshots/integration__integration_tests__switch__switch_internal_with_execute.snap
index 9f934312d..c3119e056 100644
Binary files a/tests/snapshots/integration__integration_tests__switch__switch_internal_with_execute.snap and b/tests/snapshots/integration__integration_tests__switch__switch_internal_with_execute.snap differ
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_execute_still_runs.snap b/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_execute_still_runs.snap
index 622365557..785ec919b 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_execute_still_runs.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_execute_still_runs.snap
@@ -20,14 +20,14 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp5jJ6Hd/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp1P1ouy/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
✅ Created new worktree for no-hooks-test at [REPO].no-hooks-test
🔄 Executing (--execute):
-  echo 'execute command runs'
+  echo 'execute command runs'
execute command runs
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_existing.snap b/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_existing.snap
index 9a75e5f1b..e67f25d62 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_existing.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_existing.snap
@@ -19,14 +19,14 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpkG95YB/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpS8ulIg/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
✅ Switched to worktree for existing-no-hooks at [WORKTREE_EXISTING_NO_HOOKS]
🔄 Executing (--execute):
-  echo 'execute still runs'
+  echo 'execute still runs'
execute still runs