Skip to content

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

Refactor: Simplify styling by using constants

Maximilian Roosa79947543884
diff --git a/src/commands/config.rs b/src/commands/config.rs
index 06c3ffb63..0f424f0b4 100644
--- a/src/commands/config.rs
+++ b/src/commands/config.rs
@@ -1,8 +1,7 @@
-use anstyle::{AnsiColor, Color};
use etcetera::base_strategy::{BaseStrategy, choose_base_strategy};
use std::path::PathBuf;
use worktrunk::git::{GitError, Repository};
-use worktrunk::styling::{AnstyleStyle, HINT, HINT_EMOJI, format_toml, print, println};
+use worktrunk::styling::{AnstyleStyle, GREEN, HINT, HINT_EMOJI, format_toml, print, println};
/// Example configuration file content
const CONFIG_EXAMPLE: &str = include_str!("../../config.example.toml");
@@ -37,9 +36,8 @@ pub fn handle_config_init() -> Result<(), GitError> {
.map_err(|e| GitError::CommandFailed(format!("Failed to write config file: {}", e)))?;
// Success message
- let green = AnstyleStyle::new().fg_color(Some(Color::Ansi(AnsiColor::Green)));
let bold = AnstyleStyle::new().bold();
- println!("✅ {green}Created config file{green:#}");
+ println!("✅ {GREEN}Created config file{GREEN:#}");
println!(" {bold}{}{bold:#}", config_path.display());
println!();
println!(
diff --git a/src/commands/merge.rs b/src/commands/merge.rs
index 80536b20f..12ee2261a 100644
--- a/src/commands/merge.rs
+++ b/src/commands/merge.rs
@@ -1,7 +1,9 @@
-use anstyle::{AnsiColor, Color};
use worktrunk::config::{ProjectConfig, WorktrunkConfig, expand_command_template};
use worktrunk::git::{GitError, Repository};
-use worktrunk::styling::{AnstyleStyle, ERROR, ERROR_EMOJI, HINT, HINT_EMOJI, eprintln, println};
+use worktrunk::styling::{
+ AnstyleStyle, CYAN, CYAN_BOLD, ERROR, ERROR_EMOJI, GREEN, GREEN_BOLD, HINT, HINT_EMOJI,
+ eprintln, println,
+};
use super::command_approval::{approve_command_batch, command_config_to_vec};
use super::worktree::handle_push;
@@ -32,10 +34,8 @@ pub fn handle_merge(
// Check if already on target branch
if current_branch == target_branch {
- let green = AnstyleStyle::new().fg_color(Some(Color::Ansi(AnsiColor::Green)));
- let green_bold = green.bold();
println!(
- "✅ {green}Already on {green_bold}{target_branch}{green_bold:#}, nothing to merge{green:#}"
+ "✅ {GREEN}Already on {GREEN_BOLD}{target_branch}{GREEN_BOLD:#}, nothing to merge{GREEN:#}"
);
return Ok(());
}
@@ -76,9 +76,7 @@ pub fn handle_merge(
// Rebase onto target
if !internal {
- let cyan = AnstyleStyle::new().fg_color(Some(Color::Ansi(AnsiColor::Cyan)));
- let cyan_bold = cyan.bold();
- println!("🔄 {cyan}Rebasing onto {cyan_bold}{target_branch}{cyan_bold:#}...{cyan:#}");
+ println!("🔄 {CYAN}Rebasing onto {CYAN_BOLD}{target_branch}{CYAN_BOLD:#}...{CYAN:#}");
}
repo.run_command(&["rebase", &target_branch]).map_err(|e| {
@@ -91,8 +89,7 @@ pub fn handle_merge(
// Finish worktree unless --keep was specified
if !keep {
if !internal {
- let cyan = AnstyleStyle::new().fg_color(Some(Color::Ansi(AnsiColor::Cyan)));
- println!("🔄 {cyan}Cleaning up worktree...{cyan:#}");
+ println!("🔄 {CYAN}Cleaning up worktree...{CYAN:#}");
}
// Get primary worktree path before finishing (while we can still run git commands)
@@ -108,10 +105,8 @@ pub fn handle_merge(
let new_branch = primary_repo.current_branch()?;
if new_branch.as_deref() != Some(&target_branch) {
if !internal {
- let cyan = AnstyleStyle::new().fg_color(Some(Color::Ansi(AnsiColor::Cyan)));
- let cyan_bold = cyan.bold();
println!(
- "🔄 {cyan}Switching to {cyan_bold}{target_branch}{cyan_bold:#}...{cyan:#}"
+ "🔄 {CYAN}Switching to {CYAN_BOLD}{target_branch}{CYAN_BOLD:#}...{CYAN:#}"
);
}
primary_repo
@@ -195,8 +190,7 @@ fn handle_commit_changes(
) -> Result<(), GitError> {
let repo = Repository::current();
- let cyan = AnstyleStyle::new().fg_color(Some(Color::Ansi(AnsiColor::Cyan)));
- println!("🔄 {cyan}Committing uncommitted changes...{cyan:#}");
+ println!("🔄 {CYAN}Committing uncommitted changes...{CYAN:#}");
// Stage all tracked changes (excludes untracked files)
repo.run_command(&["add", "-u"])
@@ -219,8 +213,7 @@ fn handle_commit_changes(
repo.run_command(&["commit", "-m", &commit_message])
.map_err(|e| GitError::CommandFailed(format!("Failed to commit: {}", e)))?;
- let green = AnstyleStyle::new().fg_color(Some(Color::Ansi(AnsiColor::Green)));
- println!("✅ {green}Committed changes{green:#}");
+ println!("✅ {GREEN}Committed changes{GREEN:#}");
Ok(())
}
@@ -258,12 +251,9 @@ fn handle_squash(target_branch: &str, internal: bool) -> Result<Option<usize>, G
if commit_count == 1 && !has_staged {
// Single commit, no staged changes - nothing to do
if !internal {
- let cyan_bold = AnstyleStyle::new()
- .fg_color(Some(Color::Ansi(AnsiColor::Cyan)))
- .bold();
let dim = AnstyleStyle::new().dimmed();
println!(
- "{dim}Only 1 commit since {cyan_bold}{target_branch}{cyan_bold:#} - no squashing needed{dim:#}"
+ "{dim}Only 1 commit since {CYAN_BOLD}{target_branch}{CYAN_BOLD:#} - no squashing needed{dim:#}"
);
}
return Ok(None);
@@ -271,8 +261,7 @@ fn handle_squash(target_branch: &str, internal: bool) -> Result<Option<usize>, G
// One or more commits (possibly with staged changes) - squash them
if !internal {
- let cyan = AnstyleStyle::new().fg_color(Some(Color::Ansi(AnsiColor::Cyan)));
- println!("🔄 {cyan}Squashing {commit_count} commits into one...{cyan:#}");
+ println!("🔄 {CYAN}Squashing {commit_count} commits into one...{CYAN:#}");
}
// Get commit subjects for the squash message
@@ -297,8 +286,7 @@ fn handle_squash(target_branch: &str, internal: bool) -> Result<Option<usize>, G
.map_err(|e| GitError::CommandFailed(format!("Failed to create squash commit: {}", e)))?;
if !internal {
- let green = AnstyleStyle::new().fg_color(Some(Color::Ansi(AnsiColor::Green)));
- println!("✅ {green}Squashed {commit_count} commits into one{green:#}");
+ println!("✅ {GREEN}Squashed {commit_count} commits into one{GREEN:#}");
}
Ok(Some(commit_count))
}
@@ -348,8 +336,7 @@ fn run_pre_merge_checks(
if !internal {
use std::io::Write;
- let cyan = AnstyleStyle::new().fg_color(Some(Color::Ansi(AnsiColor::Cyan)));
- println!("🔄 {cyan}Running pre-merge check '{name}'...{cyan:#}");
+ println!("🔄 {CYAN}Running pre-merge check '{name}'...{CYAN:#}");
let _ = std::io::stdout().flush();
}
diff --git a/src/commands/worktree.rs b/src/commands/worktree.rs
index 246b89116..84942c596 100644
--- a/src/commands/worktree.rs
+++ b/src/commands/worktree.rs
@@ -104,8 +104,8 @@ use std::path::PathBuf;
use worktrunk::config::{ProjectConfig, WorktrunkConfig, expand_command_template};
use worktrunk::git::{GitError, Repository};
use worktrunk::styling::{
- AnstyleStyle, ERROR, ERROR_EMOJI, HINT, HINT_EMOJI, WARNING, WARNING_EMOJI, eprint, eprintln,
- format_with_gutter, println,
+ ADDITION, AnstyleStyle, CYAN, CYAN_BOLD, DELETION, ERROR, ERROR_EMOJI, GREEN, GREEN_BOLD, HINT,
+ HINT_EMOJI, WARNING, WARNING_EMOJI, eprint, eprintln, format_with_gutter, println,
};
use crate::commands::command_approval::{approve_command_batch, command_config_to_vec};
@@ -372,10 +372,8 @@ fn execute_post_create_commands(
let expanded_command =
expand_command_template(&command, repo_name, branch, worktree_path, &repo_root, None);
- use anstyle::{AnsiColor, Color};
use std::io::Write;
- let cyan = AnstyleStyle::new().fg_color(Some(Color::Ansi(AnsiColor::Cyan)));
- eprintln!("🔄 {cyan}Executing (post-create):{cyan:#}");
+ eprintln!("🔄 {CYAN}Executing (post-create):{CYAN:#}");
eprint!("{}", format_with_gutter(&expanded_command));
let _ = std::io::stderr().flush();
@@ -434,10 +432,9 @@ fn spawn_post_start_commands(
let expanded_command =
expand_command_template(&command, repo_name, branch, worktree_path, &repo_root, None);
- use anstyle::{AnsiColor, Color};
use std::io::Write;
- let cyan = AnstyleStyle::new().fg_color(Some(Color::Ansi(AnsiColor::Cyan)));
- eprintln!("🔄 {cyan}Starting (background): {expanded_command}{cyan:#}");
+ eprintln!("🔄 {CYAN}Starting (background):{CYAN:#}");
+ eprint!("{}", format_with_gutter(&expanded_command));
let _ = std::io::stderr().flush();
match spawn_detached(worktree_path, &expanded_command, &name) {
@@ -469,8 +466,6 @@ pub fn handle_push(
allow_merge_commits: bool,
internal: bool,
) -> Result<(), GitError> {
- use anstyle::{AnsiColor, Color};
-
let repo = Repository::current();
// Get target branch (default to default branch if not provided)
@@ -529,11 +524,8 @@ pub fn handle_push(
let head_sha = repo.run_command(&["rev-parse", "--short", "HEAD"])?;
let head_sha = head_sha.trim();
- let cyan = AnstyleStyle::new().fg_color(Some(Color::Ansi(AnsiColor::Cyan)));
- let cyan_bold = cyan.bold();
-
println!(
- "🔄 {cyan}Pushing {commit_count} {commit_text} to {cyan_bold}{target_branch}{cyan_bold:#} @ {head_sha}{cyan:#}"
+ "🔄 {CYAN}Pushing {commit_count} {commit_text} to {CYAN_BOLD}{target_branch}{CYAN_BOLD:#} @ {head_sha}{CYAN:#}"
);
println!();
@@ -576,9 +568,6 @@ pub fn handle_push(
// Build success message with statistics
if !internal {
- let green = AnstyleStyle::new().fg_color(Some(Color::Ansi(AnsiColor::Green)));
- let green_bold = green.bold();
-
if commit_count > 0 {
// Parse shortstat to extract files/insertions/deletions
// Example: " 3 files changed, 45 insertions(+), 12 deletions(-)"
@@ -598,20 +587,18 @@ pub fn handle_push(
));
}
if stats.insertions > 0 {
- let addition = AnstyleStyle::new().fg_color(Some(Color::Ansi(AnsiColor::Green)));
- summary_parts.push(format!("{addition}+{}{addition:#}", stats.insertions));
+ summary_parts.push(format!("{ADDITION}+{}{ADDITION:#}", stats.insertions));
}
if stats.deletions > 0 {
- let deletion = AnstyleStyle::new().fg_color(Some(Color::Ansi(AnsiColor::Red)));
- summary_parts.push(format!("{deletion}-{}{deletion:#}", stats.deletions));
+ summary_parts.push(format!("{DELETION}-{}{DELETION:#}", stats.deletions));
}
println!(
- "✅ {green}Pushed to {green_bold}{target_branch}{green_bold:#} ({}) {green:#}",
+ "✅ {GREEN}Pushed to {GREEN_BOLD}{target_branch}{GREEN_BOLD:#} ({}) {GREEN:#}",
summary_parts.join(", ")
);
} else {
- println!("✅ {green}Pushed to {green_bold}{target_branch}{green_bold:#}{green:#}");
+ println!("✅ {GREEN}Pushed to {GREEN_BOLD}{target_branch}{GREEN_BOLD:#}{GREEN:#}");
}
}
diff --git a/src/output/interactive.rs b/src/output/interactive.rs
index 1c52a644e..fe3fc97a8 100644
--- a/src/output/interactive.rs
+++ b/src/output/interactive.rs
@@ -1,9 +1,8 @@
//! Interactive output mode for human users
-use anstyle::{AnsiColor, Color};
use std::io::{self, Write};
use std::path::Path;
-use worktrunk::styling::{AnstyleStyle, println};
+use worktrunk::styling::{GREEN, println};
/// Interactive output mode for human users
///
@@ -20,8 +19,7 @@ impl InteractiveOutput {
}
pub fn success(&mut self, message: String) -> io::Result<()> {
- let green = AnstyleStyle::new().fg_color(Some(Color::Ansi(AnsiColor::Green)));
- println!("✅ {green}{message}{green:#}");
+ println!("✅ {GREEN}{message}{GREEN:#}");
Ok(())
}
diff --git a/src/styling.rs b/src/styling.rs
index 4ddecbc6c..8fce7cb7d 100644
--- a/src/styling.rs
+++ b/src/styling.rs
@@ -59,9 +59,19 @@ pub const DELETION: Style = Style::new().fg_color(Some(Color::Ansi(AnsiColor::Re
/// Cyan style - use as `{CYAN}text{CYAN:#}`
pub const CYAN: Style = Style::new().fg_color(Some(Color::Ansi(AnsiColor::Cyan)));
+/// Cyan bold style - use as `{CYAN_BOLD}text{CYAN_BOLD:#}`
+pub const CYAN_BOLD: Style = Style::new()
+ .fg_color(Some(Color::Ansi(AnsiColor::Cyan)))
+ .bold();
+
/// Green style - use as `{GREEN}text{GREEN:#}`
pub const GREEN: Style = Style::new().fg_color(Some(Color::Ansi(AnsiColor::Green)));
+/// Green bold style - use as `{GREEN_BOLD}text{GREEN_BOLD:#}`
+pub const GREEN_BOLD: Style = Style::new()
+ .fg_color(Some(Color::Ansi(AnsiColor::Green)))
+ .bold();
+
// ============================================================================
// Message Emojis
// ============================================================================
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 30887d49e..5c9f48ee7 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
@@ -12,7 +12,8 @@ info:
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
GIT_CONFIG_GLOBAL: /dev/null
GIT_CONFIG_SYSTEM: /dev/null
- HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp0byrQU
+ GIT_EDITOR: ""
+ HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpg0brXv
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1704067200"
@@ -28,5 +29,6 @@ To enable automatic cd, run: wt configure-shell
----- stderr -----
🔄 Executing (post-create):
  echo 'Setup done' > setup.txt
-🔄 Starting (background): sleep 0.5 && echo 'Server running' > server.txt
+🔄 Starting (background):
+  sleep 0.5 && echo 'Server running' > server.txt
→ Logs: .git/wt-logs/post-start-[NAME]-[TIMESTAMP].log
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 8cbe33d2d..e855d9625 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
@@ -14,7 +14,8 @@ info:
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
GIT_CONFIG_GLOBAL: /dev/null
GIT_CONFIG_SYSTEM: /dev/null
- HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpd9Zkby
+ GIT_EDITOR: ""
+ HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpXOg16V
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1704067200"
@@ -26,5 +27,6 @@ exit_code: 0
Path: [REPO]/../test-repo.feature
----- stderr -----
-🔄 Starting (background): echo 'Background task' > background.txt
+🔄 Starting (background):
+  echo 'Background task' > background.txt
→ Logs: .git/wt-logs/post-start-[NAME]-[TIMESTAMP].log
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 df2fd6636..9602a81d8 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
@@ -12,7 +12,8 @@ info:
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
GIT_CONFIG_GLOBAL: /dev/null
GIT_CONFIG_SYSTEM: /dev/null
- HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpd1DcV0
+ GIT_EDITOR: ""
+ HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpgCT48M
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1704067200"
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 5942a29b2..9196f1b92 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
@@ -12,7 +12,8 @@ info:
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
GIT_CONFIG_GLOBAL: /dev/null
GIT_CONFIG_SYSTEM: /dev/null
- HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpWlXFZf
+ GIT_EDITOR: ""
+ HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpjy1xEa
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1704067200"
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 1c32b946e..f7c88008f 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
@@ -12,7 +12,8 @@ info:
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
GIT_CONFIG_GLOBAL: /dev/null
GIT_CONFIG_SYSTEM: /dev/null
- HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp0nKmXP
+ GIT_EDITOR: ""
+ HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpCU11E0
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1704067200"
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 aa15f1950..8efc05d87 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
@@ -12,7 +12,8 @@ info:
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
GIT_CONFIG_GLOBAL: /dev/null
GIT_CONFIG_SYSTEM: /dev/null
- HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpGrmjMp
+ GIT_EDITOR: ""
+ HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp1AeZLB
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1704067200"
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 ba6ccc13a..aee2e56d3 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
@@ -13,7 +13,7 @@ info:
GIT_CONFIG_GLOBAL: /dev/null
GIT_CONFIG_SYSTEM: /dev/null
GIT_EDITOR: ""
- HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpM4oDJl
+ HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp0cGcZ1
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1704067200"
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 3b86628cc..209cbe437 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
@@ -12,7 +12,8 @@ info:
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
GIT_CONFIG_GLOBAL: /dev/null
GIT_CONFIG_SYSTEM: /dev/null
- HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpbxqPsC
+ GIT_EDITOR: ""
+ HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpxbKULZ
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1704067200"
@@ -26,7 +27,8 @@ exit_code: 0
To enable automatic cd, run: wt configure-shell
----- stderr -----
-🔄 Starting (background): echo 'line1
-line2
-line3' | grep line2 > filtered.txt
+🔄 Starting (background):
+  echo 'line1
+  line2
+  line3' | grep line2 > filtered.txt
→ Logs: .git/wt-logs/post-start-[NAME]-[TIMESTAMP].log
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 8201fbbf8..2bec50abc 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
@@ -12,7 +12,8 @@ info:
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
GIT_CONFIG_GLOBAL: /dev/null
GIT_CONFIG_SYSTEM: /dev/null
- HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpNQ38TV
+ GIT_EDITOR: ""
+ HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpP5nxdV
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1704067200"
@@ -26,5 +27,6 @@ exit_code: 0
To enable automatic cd, run: wt configure-shell
----- stderr -----
-🔄 Starting (background): echo 'unclosed quote
+🔄 Starting (background):
+  echo 'unclosed quote
→ Logs: .git/wt-logs/post-start-[NAME]-[TIMESTAMP].log
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 e1cdfd489..3d84b0093 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
@@ -12,7 +12,8 @@ info:
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
GIT_CONFIG_GLOBAL: /dev/null
GIT_CONFIG_SYSTEM: /dev/null
- HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpxEYJNM
+ GIT_EDITOR: ""
+ HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpN2wP2D
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1704067200"
@@ -26,5 +27,6 @@ exit_code: 0
To enable automatic cd, run: wt configure-shell
----- stderr -----
-🔄 Starting (background): echo 'stdout output' && echo 'stderr output' >&2
+🔄 Starting (background):
+  echo 'stdout output' && echo 'stderr output' >&2
→ Logs: .git/wt-logs/post-start-[NAME]-[TIMESTAMP].log
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 a04e84cb1..9fbacbae2 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
@@ -12,7 +12,8 @@ info:
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
GIT_CONFIG_GLOBAL: /dev/null
GIT_CONFIG_SYSTEM: /dev/null
- HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmph3nKhK
+ GIT_EDITOR: ""
+ HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmppcEMJL
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1704067200"
@@ -26,7 +27,9 @@ exit_code: 0
To enable automatic cd, run: wt configure-shell
----- stderr -----
-🔄 Starting (background): echo 'Task 1 running' > task1.txt
+🔄 Starting (background):
+  echo 'Task 1 running' > task1.txt
→ Logs: .git/wt-logs/post-start-[NAME]-[TIMESTAMP].log
-🔄 Starting (background): echo 'Task 2 running' > task2.txt
+🔄 Starting (background):
+  echo 'Task 2 running' > task2.txt
→ Logs: .git/wt-logs/post-start-[NAME]-[TIMESTAMP].log
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 5fcb31bc5..07ca435bc 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
@@ -12,7 +12,8 @@ info:
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
GIT_CONFIG_GLOBAL: /dev/null
GIT_CONFIG_SYSTEM: /dev/null
- HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpLDLOWF
+ GIT_EDITOR: ""
+ HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpDczT4t
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1704067200"
@@ -26,9 +27,12 @@ exit_code: 0
To enable automatic cd, run: wt configure-shell
----- stderr -----
-🔄 Starting (background): echo 'TASK1_OUTPUT'
+🔄 Starting (background):
+  echo 'TASK1_OUTPUT'
→ Logs: .git/wt-logs/post-start-[NAME]-[TIMESTAMP].log
-🔄 Starting (background): echo 'TASK2_OUTPUT'
+🔄 Starting (background):
+  echo 'TASK2_OUTPUT'
→ Logs: .git/wt-logs/post-start-[NAME]-[TIMESTAMP].log
-🔄 Starting (background): echo 'TASK3_OUTPUT'
+🔄 Starting (background):
+  echo 'TASK3_OUTPUT'
→ Logs: .git/wt-logs/post-start-[NAME]-[TIMESTAMP].log
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 7174d9d96..1a21b4f44 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
@@ -12,7 +12,8 @@ info:
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
GIT_CONFIG_GLOBAL: /dev/null
GIT_CONFIG_SYSTEM: /dev/null
- HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp4vr96M
+ GIT_EDITOR: ""
+ HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpIUXGAN
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1704067200"
@@ -26,5 +27,6 @@ exit_code: 0
To enable automatic cd, run: wt configure-shell
----- stderr -----
-🔄 Starting (background): sleep 1 && echo 'Background task done' > background.txt
+🔄 Starting (background):
+  sleep 1 && echo 'Background task done' > background.txt
→ Logs: .git/wt-logs/post-start-[NAME]-[TIMESTAMP].log