Skip to content

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

Add PowerShell directive tests and fix test file cfg placement (#125)

Maximilian Roos4ee9334d0f7e
diff --git a/Cargo.lock b/Cargo.lock
index f5b174aa7..357f231a1 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -812,6 +812,12 @@ version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2"
+[[package]]
+name = "dunce"
+version = "1.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813"
+
[[package]]
name = "east-asian-width"
version = "0.1.0"
@@ -2957,6 +2963,7 @@ dependencies = [
"crossbeam-channel",
"crossterm",
"dirs",
+ "dunce",
"env_logger",
"etcetera",
"home",
diff --git a/Cargo.toml b/Cargo.toml
index e3bd5a13b..6a28abd00 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -80,6 +80,9 @@ home = "0.5.12"
dirs = "6.0"
normalize-path = "0.2.1"
which = "7.0"
+# Cross-platform path canonicalization that avoids Windows verbatim paths (\\?\)
+# which external tools like git cannot handle. On Unix, it's a no-op wrapper.
+dunce = "1.0"
[target.'cfg(unix)'.dependencies]
skim = "0.20"
diff --git a/src/commands/configure_shell.rs b/src/commands/configure_shell.rs
index 66ab9a4e4..ee3e6d937 100644
--- a/src/commands/configure_shell.rs
+++ b/src/commands/configure_shell.rs
@@ -214,20 +214,12 @@ pub fn scan_shell_configs(
shell_filter: Option<Shell>,
dry_run: bool,
) -> Result<ScanResult, String> {
- let shells = if let Some(shell) = shell_filter {
- vec![shell]
- } else {
- // Try all supported shells in consistent order
- // On Windows, also include PowerShell for native Windows users
- #[cfg(windows)]
- {
- vec![Shell::Bash, Shell::Zsh, Shell::Fish, Shell::PowerShell]
- }
- #[cfg(not(windows))]
- {
- vec![Shell::Bash, Shell::Zsh, Shell::Fish]
- }
- };
+ #[cfg(windows)]
+ let default_shells = vec![Shell::Bash, Shell::Zsh, Shell::Fish, Shell::PowerShell];
+ #[cfg(not(windows))]
+ let default_shells = vec![Shell::Bash, Shell::Zsh, Shell::Fish];
+
+ let shells = shell_filter.map_or(default_shells, |shell| vec![shell]);
let mut results = Vec::new();
let mut skipped = Vec::new();
@@ -699,11 +691,12 @@ fn scan_for_uninstall(
shell_filter: Option<Shell>,
dry_run: bool,
) -> Result<UninstallScanResult, String> {
- let shells = if let Some(shell) = shell_filter {
- vec![shell]
- } else {
- vec![Shell::Bash, Shell::Zsh, Shell::Fish]
- };
+ #[cfg(windows)]
+ let default_shells = vec![Shell::Bash, Shell::Zsh, Shell::Fish, Shell::PowerShell];
+ #[cfg(not(windows))]
+ let default_shells = vec![Shell::Bash, Shell::Zsh, Shell::Fish];
+
+ let shells = shell_filter.map_or(default_shells, |shell| vec![shell]);
let mut results = Vec::new();
let mut not_found = Vec::new();
diff --git a/src/commands/list/collect.rs b/src/commands/list/collect.rs
index 046b26b38..5a6ab33d2 100644
--- a/src/commands/list/collect.rs
+++ b/src/commands/list/collect.rs
@@ -20,6 +20,7 @@
//!
//! This ensures fast operations don't wait for slow ones (e.g., CI doesn't block ahead/behind counts)
use crossbeam_channel as chan;
+use dunce::canonicalize;
use rayon::prelude::*;
use worktrunk::git::{LineDiff, Repository, Worktree};
use worktrunk::styling::{INFO_EMOJI, warning_message};
@@ -531,9 +532,11 @@ pub fn collect(
.iter()
.map(|wt| {
let is_main = wt.path == main_worktree.path;
+ // Canonicalize wt.path for comparison since current_worktree_path is canonicalized
+ // (On Windows, paths from git worktree list may differ from git rev-parse --show-toplevel)
let is_current = current_worktree_path
.as_ref()
- .is_some_and(|cp| &wt.path == cp);
+ .is_some_and(|cp| canonicalize(&wt.path).as_ref().ok() == Some(cp));
let is_previous = previous_branch
.as_deref()
.is_some_and(|prev| wt.branch.as_deref() == Some(prev));
@@ -551,8 +554,8 @@ pub fn collect(
// Template path is relative to main worktree, resolve it
let expected_path = main_worktree.path.join(&expected_relative);
// Canonicalize both paths for comparison (handles symlinks, .., etc.)
- let actual_canonical = wt.path.canonicalize().ok();
- let expected_canonical = expected_path.canonicalize().ok();
+ let actual_canonical = canonicalize(&wt.path).ok();
+ let expected_canonical = canonicalize(&expected_path).ok();
match (actual_canonical, expected_canonical) {
(Some(actual), Some(expected)) => actual != expected,
// Can't canonicalize one or both paths (e.g., worktree deleted,
diff --git a/src/commands/worktree.rs b/src/commands/worktree.rs
index 4f39e5aa5..1ad9379da 100644
--- a/src/commands/worktree.rs
+++ b/src/commands/worktree.rs
@@ -111,6 +111,7 @@
//! The shell wrapper is generated by `wt config shell init <shell>` from templates in `templates/`.
use color_print::cformat;
+use dunce::canonicalize;
use normalize_path::NormalizePath;
use std::path::PathBuf;
use worktrunk::HookType;
@@ -351,10 +352,10 @@ pub fn handle_switch(
// Helper to build switch result for an existing worktree
let switch_to_existing = |path: PathBuf, branch: String| -> (SwitchResult, String) {
- let canonical_path = path.canonicalize().unwrap_or(path);
+ let canonical_path = canonicalize(&path).unwrap_or(path);
let current_dir = std::env::current_dir()
.ok()
- .and_then(|p| p.canonicalize().ok());
+ .and_then(|p| canonicalize(&p).ok());
let already_at_worktree = current_dir
.as_ref()
.map(|cur| cur == &canonical_path)
diff --git a/src/git/repository/mod.rs b/src/git/repository/mod.rs
index 48f1b4b1d..72bd5317c 100644
--- a/src/git/repository/mod.rs
+++ b/src/git/repository/mod.rs
@@ -5,6 +5,8 @@ use std::sync::OnceLock;
use anyhow::{Context, bail};
use normalize_path::NormalizePath;
+use dunce::canonicalize;
+
// Import types and functions from parent module (mod.rs)
use super::{
BranchCategory, CompletionBranch, DefaultBranchName, DiffStats, GitError, LineDiff, Worktree,
@@ -109,10 +111,8 @@ impl Repository {
return Ok(layout);
}
- let git_common_dir = self
- .git_common_dir()?
- .canonicalize()
- .context("Failed to canonicalize path")?;
+ let git_common_dir =
+ canonicalize(&self.git_common_dir()?).context("Failed to canonicalize path")?;
let is_bare = self.is_bare_repo()?;
@@ -494,10 +494,7 @@ impl Repository {
// Resolve relative paths against the repo's directory
if path.is_relative() {
- self.path
- .join(&path)
- .canonicalize()
- .context("Failed to resolve git common directory")
+ canonicalize(self.path.join(&path)).context("Failed to resolve git common directory")
} else {
Ok(path)
}
@@ -512,10 +509,7 @@ impl Repository {
// Resolve relative paths against the repo's directory
if path.is_relative() {
- self.path
- .join(&path)
- .canonicalize()
- .context("Failed to resolve git directory")
+ canonicalize(self.path.join(&path)).context("Failed to resolve git directory")
} else {
Ok(path)
}
@@ -564,8 +558,7 @@ impl Repository {
pub fn worktree_root(&self) -> anyhow::Result<PathBuf> {
let stdout = self.run_command(&["rev-parse", "--show-toplevel"])?;
let path = PathBuf::from(stdout.trim());
- path.canonicalize()
- .context("Failed to canonicalize worktree root")
+ canonicalize(&path).context("Failed to canonicalize worktree root")
}
/// Check if the path is in a worktree (vs the main repository).
diff --git a/src/shell_exec.rs b/src/shell_exec.rs
index 4ae743134..46f55f2da 100644
--- a/src/shell_exec.rs
+++ b/src/shell_exec.rs
@@ -128,23 +128,28 @@ fn detect_windows_shell() -> ShellConfig {
///
/// Checks:
/// 1. MSYSTEM environment variable (indicates running in Git Bash/MSYS2)
-/// 2. Standard Git for Windows installation paths
+/// 2. Standard Git for Windows and MSYS2 installation paths
/// 3. `git.exe` in PATH to find Git installation directory
#[cfg(windows)]
fn find_git_bash() -> Option<PathBuf> {
- // If we're already in Git Bash (MSYSTEM is set), bash should be in PATH
+ // If we're already in Git Bash/MSYS2 (MSYSTEM is set), bash should be in PATH
if std::env::var("MSYSTEM").is_ok() && which::which("bash").is_ok() {
return Some(PathBuf::from("bash"));
}
- // Check standard Git for Windows installation paths
- let standard_paths = [
+ // Check standard installation paths for bash.exe
+ // (Git for Windows and MSYS2 both provide POSIX-compatible bash)
+ let bash_paths = [
+ // Git for Windows
r"C:\Program Files\Git\bin\bash.exe",
r"C:\Program Files (x86)\Git\bin\bash.exe",
r"C:\Git\bin\bash.exe",
+ // MSYS2 standalone (popular alternative to Git Bash)
+ r"C:\msys64\usr\bin\bash.exe",
+ r"C:\msys32\usr\bin\bash.exe",
];
- for path in &standard_paths {
+ for path in &bash_paths {
let path = PathBuf::from(path);
if path.exists() {
return Some(path);
diff --git a/tests/common/mod.rs b/tests/common/mod.rs
index cda4b112f..1c623023c 100644
--- a/tests/common/mod.rs
+++ b/tests/common/mod.rs
@@ -1,7 +1,3 @@
-// Test utilities are Unix-only as they're used by integration tests
-// which rely on Unix-specific behavior (PTY, shell integration, etc.)
-#![cfg(unix)]
-
//! # Test Utilities for worktrunk
//!
//! This module provides test harnesses for testing the worktrunk CLI tool.
@@ -25,6 +21,10 @@
//!
//! Paths are canonicalized to handle platform differences (especially macOS symlinks
//! like /var -> /private/var). This ensures snapshot filters work correctly.
+//!
+//! On Windows, `std::fs::canonicalize()` returns verbatim paths (`\\?\C:\...`) which
+//! git cannot handle. We use `normalize_path()` to strip these prefixes while
+//! preserving the symlink resolution behavior needed on macOS.
pub mod list_snapshots;
// Progressive output tests use PTY and are Unix-only for now
@@ -41,6 +41,15 @@ use std::process::Command;
use tempfile::TempDir;
use worktrunk::config::sanitize_branch_name;
+/// Canonicalize a path without Windows verbatim prefix (`\\?\`).
+///
+/// On Windows, `std::fs::canonicalize()` returns verbatim paths like `\\?\C:\...`
+/// which git cannot handle. The `dunce` crate strips this prefix when safe.
+/// On Unix, this is equivalent to `std::fs::canonicalize()`.
+fn canonicalize(path: &Path) -> std::io::Result<PathBuf> {
+ dunce::canonicalize(path)
+}
+
/// Time constants for `commit_with_age()` - use as `5 * MINUTE`, `2 * HOUR`, etc.
pub const MINUTE: i64 = 60;
pub const HOUR: i64 = 60 * MINUTE;
@@ -133,10 +142,18 @@ pub fn configure_cli_command(cmd: &mut Command) {
cmd.env("COLUMNS", "150");
}
-/// Set `HOME` and `XDG_CONFIG_HOME` for commands that rely on isolated temp homes.
+/// Set home environment variables for commands that rely on isolated temp homes.
+///
+/// Sets both Unix (`HOME`, `XDG_CONFIG_HOME`) and Windows (`USERPROFILE`) variables
+/// so the `home` crate can find the temp home directory on all platforms.
pub fn set_temp_home_env(cmd: &mut Command, home: &Path) {
cmd.env("HOME", home);
cmd.env("XDG_CONFIG_HOME", home.join(".config"));
+ // Windows: the `home` crate uses USERPROFILE for home_dir()
+ cmd.env("USERPROFILE", home);
+ // Windows: etcetera uses APPDATA for config_dir() (AppData\Roaming)
+ // Map it to .config to match Unix XDG_CONFIG_HOME behavior
+ cmd.env("APPDATA", home.join(".config"));
}
pub struct TestRepo {
@@ -160,7 +177,7 @@ impl TestRepo {
let root = temp_dir.path().join("repo");
std::fs::create_dir(&root).unwrap();
// Canonicalize to resolve symlinks (important on macOS where /var is symlink to /private/var)
- let root = root.canonicalize().unwrap();
+ let root = canonicalize(&root).unwrap();
// Create isolated config path for this test
let test_config_path = temp_dir.path().join("test-config.toml");
@@ -214,6 +231,7 @@ impl TestRepo {
///
/// This is useful for PTY tests and other cases where you need environment variables
/// as a vector rather than setting them on a Command.
+ #[cfg_attr(windows, allow(dead_code))] // Used only by unix PTY tests
pub fn test_env_vars(&self) -> Vec<(String, String)> {
vec![
("CLICOLOR_FORCE".to_string(), "1".to_string()),
@@ -463,7 +481,7 @@ impl TestRepo {
}
// Canonicalize worktree path to match what git returns
- let canonical_path = worktree_path.canonicalize().unwrap();
+ let canonical_path = canonicalize(&worktree_path).unwrap();
// Use branch as key (consistent with path generation)
self.worktrees
.insert(branch.to_string(), canonical_path.clone());
@@ -560,7 +578,7 @@ impl TestRepo {
.unwrap();
// Canonicalize remote path
- let remote_path = remote_path.canonicalize().unwrap();
+ let remote_path = canonicalize(&remote_path).unwrap();
// Add as remote
let mut cmd = Command::new("git");
@@ -740,28 +758,58 @@ pub fn setup_snapshot_settings(repo: &TestRepo) -> insta::Settings {
// This must come before repo path filter to avoid partial matches
let project_root = std::env::var("CARGO_MANIFEST_DIR")
.ok()
- .and_then(|p| std::path::PathBuf::from(p).canonicalize().ok());
+ .and_then(|p| canonicalize(std::path::Path::new(&p)).ok());
if let Some(root) = project_root {
settings.add_filter(&regex::escape(root.to_str().unwrap()), "[PROJECT_ROOT]");
}
// Normalize paths (canonicalize for macOS /var -> /private/var symlink)
- let root_canonical = repo
- .root_path()
- .canonicalize()
- .unwrap_or_else(|_| repo.root_path().to_path_buf());
- settings.add_filter(&regex::escape(root_canonical.to_str().unwrap()), "[REPO]");
+ let root_canonical =
+ canonicalize(repo.root_path()).unwrap_or_else(|_| repo.root_path().to_path_buf());
+ let root_str = root_canonical.to_str().unwrap();
+ // Add both backslash and forward-slash versions for Windows compatibility
+ // (output may have either format depending on when filters are applied)
+ settings.add_filter(&regex::escape(root_str), "[REPO]");
+ settings.add_filter(&regex::escape(&root_str.replace('\\', "/")), "[REPO]");
+
+ // On Windows, format_path_for_display() converts paths under HOME to tilde-prefixed.
+ // Since temp directories (like C:\Users\runner\AppData\Local\Temp\.tmpXXX) are under HOME,
+ // the repo path becomes ~/AppData/Local/Temp/.tmpXXX/repo in output.
+ // Add filter for tilde-prefixed repo path.
+ // Note: canonicalize home_dir too, since on Windows home::home_dir() may return a short path
+ // (C:\Users\RUNNER~1) while dunce::canonicalize returns the long path (C:\Users\runneradmin).
+ if let Some(home) = home::home_dir().and_then(|h| canonicalize(&h).ok())
+ && let Ok(relative) = root_canonical.strip_prefix(&home)
+ {
+ let tilde_path = format!("~/{}", relative.display()).replace('\\', "/");
+ settings.add_filter(&regex::escape(&tilde_path), "[REPO]");
+ }
+
for (name, path) in &repo.worktrees {
- let canonical = path.canonicalize().unwrap_or_else(|_| path.clone());
- settings.add_filter(
- &regex::escape(canonical.to_str().unwrap()),
- format!("[WORKTREE_{}]", name.to_uppercase().replace('-', "_")),
- );
+ let canonical = canonicalize(path).unwrap_or_else(|_| path.clone());
+ let path_str = canonical.to_str().unwrap();
+ let replacement = format!("[WORKTREE_{}]", name.to_uppercase().replace('-', "_"));
+ settings.add_filter(&regex::escape(path_str), &replacement);
+ settings.add_filter(&regex::escape(&path_str.replace('\\', "/")), &replacement);
+
+ // Also add tilde-prefixed worktree path filter for Windows
+ if let Some(home) = home::home_dir().and_then(|h| canonicalize(&h).ok())
+ && let Ok(relative) = canonical.strip_prefix(&home)
+ {
+ let tilde_path = format!("~/{}", relative.display()).replace('\\', "/");
+ settings.add_filter(&regex::escape(&tilde_path), &replacement);
+ }
}
// Normalize backslashes for Windows compatibility
settings.add_filter(r"\\", "/");
+ // Windows fallback: use a regex pattern to catch tilde-prefixed Windows temp paths.
+ // This handles cases where path formats differ between home::home_dir() and the actual
+ // paths used in commands. MUST come after backslash normalization so paths have forward slashes.
+ // Pattern: ~/AppData/Local/Temp/.tmpXXXXXX/repo (where XXXXXX varies)
+ settings.add_filter(r"~/AppData/Local/Temp/\.tmp[^/]+/repo", "[REPO]");
+
// Normalize temp directory paths in project identifiers (approval prompts)
// Example: /private/var/folders/wf/.../T/.tmpABC123/origin -> [PROJECT_ID]
settings.add_filter(
@@ -788,6 +836,8 @@ pub fn setup_snapshot_settings(repo: &TestRepo) -> insta::Settings {
settings.add_redaction(".env.GIT_CONFIG_GLOBAL", "[TEST_GIT_CONFIG]");
settings.add_redaction(".env.WORKTRUNK_CONFIG_PATH", "[TEST_CONFIG]");
settings.add_redaction(".env.HOME", "[TEST_HOME]");
+ // Windows: the `home` crate uses USERPROFILE for home_dir()
+ settings.add_redaction(".env.USERPROFILE", "[TEST_HOME]");
settings.add_redaction(".env.XDG_CONFIG_HOME", "[TEST_CONFIG_HOME]");
settings.add_redaction(".env.PATH", "[PATH]");
@@ -819,10 +869,18 @@ pub fn setup_snapshot_settings(repo: &TestRepo) -> insta::Settings {
// when capturing stderr from shell commands due to timing/buffering differences
settings.add_filter(r"Broken pipe \(os error 32\)", "Error: connection refused");
- // Normalize OS-specific error messages in gutter output
- // Ubuntu may produce "Broken pipe (os error 32)" instead of the expected error
- // when capturing stderr from shell commands due to timing/buffering differences
- settings.add_filter(r"Broken pipe \(os error 32\)", "Error: connection refused");
+ // Filter out PowerShell lines on Windows - these appear only on Windows
+ // and would cause snapshot mismatches with Unix snapshots
+ settings.add_filter(r"(?m)^.*[Pp]owershell.*\n", "");
+
+ // Normalize Windows executable extension in help output
+ // On Windows, clap shows "wt.exe" instead of "wt"
+ settings.add_filter(r"wt\.exe", "wt");
+
+ // Remove trailing ANSI reset codes at end of lines for cross-platform consistency
+ // Windows terminal strips these trailing resets that Unix includes
+ settings.add_filter(r"\x1b\[0m$", "");
+ settings.add_filter(r"\x1b\[0m\n", "\n");
settings
}
@@ -833,7 +891,10 @@ pub fn setup_snapshot_settings(repo: &TestRepo) -> insta::Settings {
/// Use this for tests that need both a TestRepo and a temporary home (for user config testing).
pub fn setup_snapshot_settings_with_home(repo: &TestRepo, temp_home: &TempDir) -> insta::Settings {
let mut settings = setup_snapshot_settings(repo);
- settings.add_filter(&temp_home.path().to_string_lossy(), "[TEMP_HOME]");
+ settings.add_filter(
+ &regex::escape(&temp_home.path().to_string_lossy()),
+ "[TEMP_HOME]",
+ );
settings
}
@@ -844,8 +905,16 @@ pub fn setup_snapshot_settings_with_home(repo: &TestRepo, temp_home: &TempDir) -
pub fn setup_home_snapshot_settings(temp_home: &TempDir) -> insta::Settings {
let mut settings = insta::Settings::clone_current();
settings.set_snapshot_path("../snapshots");
- settings.add_filter(&temp_home.path().to_string_lossy(), "[TEMP_HOME]");
+ settings.add_filter(
+ &regex::escape(&temp_home.path().to_string_lossy()),
+ "[TEMP_HOME]",
+ );
settings.add_filter(r"\\", "/");
+ // Filter out PowerShell lines on Windows - these appear only on Windows
+ // and would cause snapshot mismatches with Unix snapshots
+ settings.add_filter(r"(?m)^.*[Pp]owershell.*\n", "");
+ // Normalize Windows executable extension in help output
+ settings.add_filter(r"wt\.exe", "wt");
settings
}
@@ -860,6 +929,8 @@ pub fn setup_temp_snapshot_settings(temp_path: &std::path::Path) -> insta::Setti
// Filter temp paths in output
settings.add_filter(&regex::escape(temp_path.to_str().unwrap()), "[TEMP]");
settings.add_filter(r"\\", "/");
+ // Normalize Windows executable extension in help output
+ settings.add_filter(r"wt\.exe", "wt");
// Redact volatile metadata captured by insta-cmd
settings.add_redaction(".env.GIT_CONFIG_GLOBAL", "[TEST_GIT_CONFIG]");
@@ -990,6 +1061,7 @@ pub struct ExponentialBackoff {
/// Maximum sleep duration in milliseconds
pub max_ms: u64,
/// Total timeout
+ #[cfg_attr(windows, allow(dead_code))] // Used only by unix PTY tests
pub timeout: std::time::Duration,
}
diff --git a/tests/integration_tests/approval_pty.rs b/tests/integration_tests/approval_pty.rs
index 282299334..9172da281 100644
--- a/tests/integration_tests/approval_pty.rs
+++ b/tests/integration_tests/approval_pty.rs
@@ -1,3 +1,4 @@
+#![cfg(unix)]
//! PTY-based tests for interactive approval prompts
//!
//! These tests verify the approval workflow in a real PTY environment where stdin is a TTY.
diff --git a/tests/integration_tests/approval_save.rs b/tests/integration_tests/approval_save.rs
index f78d9a01e..b44731c69 100644
--- a/tests/integration_tests/approval_save.rs
+++ b/tests/integration_tests/approval_save.rs
@@ -350,6 +350,7 @@ args = ["-s"]
/// root can write to read-only files. Consider using capabilities or other mechanisms
/// to test permission handling in all environments.
#[test]
+#[cfg(unix)]
fn test_permission_error_prevents_save() {
use std::fs::Permissions;
use std::os::unix::fs::PermissionsExt;
diff --git a/tests/integration_tests/bare_repository.rs b/tests/integration_tests/bare_repository.rs
index 3452de090..69d8a1f03 100644
--- a/tests/integration_tests/bare_repository.rs
+++ b/tests/integration_tests/bare_repository.rs
@@ -477,7 +477,13 @@ fn test_bare_repo_commands_from_bare_directory() {
assert!(!stderr.contains("bare"), "Should not show bare repo itself");
}
+/// Test that merge workflow works correctly with bare repositories.
+///
+/// Skipped on Windows due to file locking issues that prevent worktree removal
+/// during background cleanup after merge. The merge functionality itself works
+/// correctly - this is a timing/cleanup issue specific to Windows file handles.
#[test]
+#[cfg_attr(windows, ignore)]
fn test_bare_repo_merge_workflow() {
let test = BareRepoTest::new();
diff --git a/tests/integration_tests/config_show.rs b/tests/integration_tests/config_show.rs
index b6873118f..a97b5ec00 100644
--- a/tests/integration_tests/config_show.rs
+++ b/tests/integration_tests/config_show.rs
@@ -52,16 +52,16 @@ server = "npm run dev"
----- stderr -----
USER CONFIG ~/.config/worktrunk/config.toml
-   worktree-path = "../{{ main_worktree }}.{{ branch }}"
+   worktree-path = "../{{ main_worktree }}.{{ branch }}"
 
-   [projects."test-project"]
+   [projects."test-project"]
  approved-commands = ["npm install"]
PROJECT CONFIG [REPO]/.config/wt.toml
-   post-create = "npm install"
+   post-create = "npm install"
 
-   [post-start]
-   server = "npm run dev"
+   [post-start]
+   server = "npm run dev"
⚪ Skipped bash; ~/.bashrc not found
⚪ Skipped zsh; ~/.zshrc not found
@@ -100,7 +100,7 @@ fn test_config_show_no_project_config() {
----- stderr -----
USER CONFIG ~/.config/worktrunk/config.toml
-   worktree-path = "../{{ main_worktree }}.{{ branch }}"
+   worktree-path = "../{{ main_worktree }}.{{ branch }}"
PROJECT CONFIG [REPO]/.config/wt.toml
💡 Not found
@@ -299,12 +299,12 @@ fn test_config_show_warns_unknown_project_keys() {
----- stderr -----
USER CONFIG ~/.config/worktrunk/config.toml
-   worktree-path = "../{{ main_worktree }}.{{ branch }}"
+   worktree-path = "../{{ main_worktree }}.{{ branch }}"
PROJECT CONFIG [REPO]/.config/wt.toml
🟡 Unknown key post-merge-command will be ignored
-   [post-merge-command]
-   deploy = "task deploy"
+   [post-merge-command]
+   deploy = "task deploy"
⚪ Skipped bash; ~/.bashrc not found
⚪ Skipped zsh; ~/.zshrc not found
@@ -343,10 +343,10 @@ fn test_config_show_warns_unknown_user_keys() {
----- stderr -----
USER CONFIG ~/.config/worktrunk/config.toml
🟡 Unknown key commit-gen will be ignored
-   worktree-path = "../{{ main_worktree }}.{{ branch }}"
+   worktree-path = "../{{ main_worktree }}.{{ branch }}"
 
-   [commit-gen]
-   command = "llm"
+   [commit-gen]
+   command = "llm"
PROJECT CONFIG [REPO]/.config/wt.toml
💡 Not found
diff --git a/tests/integration_tests/directives.rs b/tests/integration_tests/directives.rs
index a6257e29b..bc3ac8711 100644
--- a/tests/integration_tests/directives.rs
+++ b/tests/integration_tests/directives.rs
@@ -3,6 +3,122 @@ use insta::Settings;
use insta_cmd::assert_cmd_snapshot;
use std::process::Command;
+// ============================================================================
+// PowerShell Directive Tests
+// ============================================================================
+// These tests verify that --internal=powershell produces correct PowerShell syntax.
+// The PowerShell directive mode outputs:
+// - `Set-Location 'path'` instead of `cd 'path'`
+// - Proper single-quote escaping ('' instead of '\'' for embedded quotes)
+
+/// Test that switch with --internal=powershell outputs PowerShell Set-Location syntax
+#[test]
+fn test_switch_internal_powershell_directive() {
+ let mut repo = TestRepo::new();
+ repo.commit("Initial commit");
+ repo.setup_remote("main");
+ let _feature_wt = repo.add_worktree("feature");
+
+ let mut settings = setup_snapshot_settings(&repo);
+ // Normalize the PowerShell Set-Location path
+ settings.add_filter(r"Set-Location '[^']+'", "Set-Location '[PATH]'");
+
+ settings.bind(|| {
+ let mut cmd = wt_command();
+ repo.clean_cli_env(&mut cmd);
+ cmd.arg("--internal=powershell")
+ .arg("switch")
+ .arg("feature")
+ .current_dir(repo.root_path());
+
+ // Use file-based snapshot since inline snapshots don't handle
+ // path normalization and ANSI codes well
+ assert_cmd_snapshot!(cmd);
+ });
+}
+
+/// Test merge with --internal=powershell (switch back to main after merge)
+#[test]
+fn test_merge_internal_powershell_directive() {
+ let mut repo = TestRepo::new();
+ repo.commit("Initial commit");
+ repo.setup_remote("main");
+
+ // Create a worktree for main
+ let main_wt = repo.root_path().parent().unwrap().join("repo.main-wt");
+ let mut cmd = Command::new("git");
+ repo.configure_git_cmd(&mut cmd);
+ cmd.args(["worktree", "add", main_wt.to_str().unwrap(), "main"])
+ .current_dir(repo.root_path())
+ .output()
+ .unwrap();
+
+ // Create a feature worktree and make a commit
+ let feature_wt = repo.add_worktree("feature");
+ std::fs::write(feature_wt.join("feature.txt"), "feature content").unwrap();
+
+ let mut cmd = Command::new("git");
+ repo.configure_git_cmd(&mut cmd);
+ cmd.args(["add", "feature.txt"])
+ .current_dir(&feature_wt)
+ .output()
+ .unwrap();
+
+ let mut cmd = Command::new("git");
+ repo.configure_git_cmd(&mut cmd);
+ cmd.args(["commit", "-m", "Add feature file"])
+ .current_dir(&feature_wt)
+ .output()
+ .unwrap();
+
+ let mut settings = setup_snapshot_settings(&repo);
+ // Normalize the PowerShell Set-Location path
+ settings.add_filter(r"Set-Location '[^']+'", "Set-Location '[PATH]'");
+
+ settings.bind(|| {
+ let mut cmd = wt_command();
+ repo.clean_cli_env(&mut cmd);
+ cmd.arg("--internal=powershell")
+ .arg("merge")
+ .arg("main")
+ .current_dir(&feature_wt);
+
+ assert_cmd_snapshot!(cmd);
+ });
+}
+
+/// Test that remove with --internal=powershell outputs PowerShell Set-Location syntax
+///
+/// Note: Skipped on Windows due to platform differences in ANSI escape code handling
+/// (Unix doubles ESC[36m, Windows doesn't). The Set-Location syntax itself works correctly
+/// on both platforms - this is purely a test snapshot compatibility issue.
+#[test]
+#[cfg_attr(windows, ignore)]
+fn test_remove_internal_powershell_directive() {
+ let mut repo = TestRepo::new();
+ repo.commit("Initial commit");
+ repo.setup_remote("main");
+ let feature_wt = repo.add_worktree("feature");
+
+ let mut settings = setup_snapshot_settings(&repo);
+ // Normalize the PowerShell Set-Location path
+ settings.add_filter(r"Set-Location '[^']+'", "Set-Location '[PATH]'");
+
+ settings.bind(|| {
+ let mut cmd = wt_command();
+ repo.clean_cli_env(&mut cmd);
+ cmd.arg("--internal=powershell")
+ .arg("remove")
+ .current_dir(&feature_wt);
+
+ assert_cmd_snapshot!(cmd);
+ });
+}
+
+// ============================================================================
+// POSIX Directive Tests (existing tests)
+// ============================================================================
+
/// Test the directive protocol for switch command
#[test]
fn test_switch_internal_directive() {
diff --git a/tests/integration_tests/help.rs b/tests/integration_tests/help.rs
index 0ab86b029..f848043e2 100644
--- a/tests/integration_tests/help.rs
+++ b/tests/integration_tests/help.rs
@@ -5,6 +5,11 @@
//!
//! - Short help (`-h`): Compact format, single-line options
//! - Long help (`--help`): Verbose format with `after_long_help` content
+//!
+//! Skipped on Windows: clap renders markdown differently on Windows (tables, links,
+//! emphasis) resulting in formatting-only differences. The help content is identical;
+//! only the presentation varies.
+#![cfg(not(windows))]
use crate::common::wt_command;
use insta::Settings;
@@ -13,6 +18,9 @@ use insta_cmd::assert_cmd_snapshot;
fn snapshot_help(test_name: &str, args: &[&str]) {
let mut settings = Settings::clone_current();
settings.set_snapshot_path("../snapshots");
+ // Remove trailing ANSI reset codes at end of lines for cross-platform consistency
+ settings.add_filter(r"\x1b\[0m$", "");
+ settings.add_filter(r"\x1b\[0m\n", "\n");
settings.bind(|| {
let mut cmd = wt_command();
cmd.args(args);
diff --git a/tests/integration_tests/hook_show.rs b/tests/integration_tests/hook_show.rs
index 81d8c8eab..d973d7b03 100644
--- a/tests/integration_tests/hook_show.rs
+++ b/tests/integration_tests/hook_show.rs
@@ -186,7 +186,7 @@ lint = "pre-commit run"
let mut settings = insta::Settings::clone_current();
// Replace temp home path with ~ for stable snapshots
- settings.add_filter(temp_home.path().to_string_lossy().as_ref(), "~");
+ settings.add_filter(&regex::escape(&temp_home.path().to_string_lossy()), "~");
settings.bind(|| {
let mut cmd = wt_command();
cmd.arg("hook").arg("show").current_dir(temp_dir.path());
diff --git a/tests/integration_tests/init.rs b/tests/integration_tests/init.rs
index bd582a382..bcce511a9 100644
--- a/tests/integration_tests/init.rs
+++ b/tests/integration_tests/init.rs
@@ -1,3 +1,10 @@
+//! Snapshot tests for `wt config shell init` command output.
+//!
+//! Skipped on Windows: These tests verify shell init scripts for bash/zsh/fish.
+//! Windows line endings (CRLF) cause snapshot mismatches, and these Unix shells
+//! are not the primary shell integration path on Windows (PowerShell is).
+#![cfg(not(windows))]
+
use crate::common::{TestRepo, wt_command};
use insta::Settings;
use insta_cmd::assert_cmd_snapshot;
diff --git a/tests/integration_tests/list.rs b/tests/integration_tests/list.rs
index c425a1dd8..3453aac3b 100644
--- a/tests/integration_tests/list.rs
+++ b/tests/integration_tests/list.rs
@@ -2161,8 +2161,8 @@ fn test_list_with_c_flag() {
settings.bind(|| {
let mut cmd = wt_command();
cmd.args(["-C", repo.root_path().to_str().unwrap(), "list"]);
- // Run from /tmp to ensure -C is actually being used
- cmd.current_dir("/tmp");
+ // Run from system temp dir to ensure -C is actually being used
+ cmd.current_dir(std::env::temp_dir());
assert_cmd_snapshot!("list_with_c_flag", cmd);
});
}
diff --git a/tests/integration_tests/merge.rs b/tests/integration_tests/merge.rs
index b60bbda80..0820aa9b9 100644
--- a/tests/integration_tests/merge.rs
+++ b/tests/integration_tests/merge.rs
@@ -1743,7 +1743,10 @@ fn test_merge_no_remote() {
/// Output is used in README.md "What It Does" section.
/// Merge output: tests/snapshots/integration__integration_tests__merge__readme_example_simple.snap
/// Switch output: tests/snapshots/integration__integration_tests__merge__readme_example_simple_switch.snap
+///
+/// Skipped on Windows: Uses Unix shell commands (chmod, echo) for mock command scripts.
#[test]
+#[cfg_attr(windows, ignore)]
fn test_readme_example_simple() {
let repo = TestRepo::new();
repo.commit("Initial commit");
@@ -1798,7 +1801,10 @@ pub fn refresh(refresh_token: &str) -> String {
///
/// Output is used in README.md "Advanced Features" or "Project Automation" section.
/// Source: tests/snapshots/integration__integration_tests__merge__readme_example_complex.snap
+///
+/// Skipped on Windows: Uses Unix shell commands (chmod, echo) for mock command scripts.
#[test]
+#[cfg_attr(windows, ignore)]
fn test_readme_example_complex() {
let mut repo = TestRepo::new();
repo.commit("Initial commit");
@@ -2034,7 +2040,10 @@ command = "{}"
///
/// Output is used in README.md "Project Hooks" section.
/// Source: tests/snapshots/integration__integration_tests__merge__readme_example_hooks_post_create.snap
+///
+/// Skipped on Windows: Uses Unix shell commands (chmod, echo) for mock command scripts.
#[test]
+#[cfg_attr(windows, ignore)]
fn test_readme_example_hooks_post_create() {
let repo = TestRepo::new();
repo.commit("Initial commit");
@@ -2119,7 +2128,10 @@ fi
///
/// Output is used in README.md "Project Hooks" section.
/// Source: tests/snapshots/integration__integration_tests__merge__readme_example_hooks_pre_merge.snap
+///
+/// Skipped on Windows: Uses Unix shell commands (chmod, echo) for mock command scripts.
#[test]
+#[cfg_attr(windows, ignore)]
fn test_readme_example_hooks_pre_merge() {
let mut repo = TestRepo::new();
repo.commit("Initial commit");
diff --git a/tests/integration_tests/mod.rs b/tests/integration_tests/mod.rs
index 1edece6e5..4f5b3710c 100644
--- a/tests/integration_tests/mod.rs
+++ b/tests/integration_tests/mod.rs
@@ -1,6 +1,6 @@
-// Integration tests are Unix-only as they test bash/fish/zsh shell integration
-// and rely on Unix-specific TTY/stdin/stdout behavior
-#![cfg(unix)]
+// Note: Some tests require Unix-specific features (PTY, shell integration).
+// Those are gated at the individual file level with #[cfg(unix)] or
+// #[cfg(all(unix, feature = "shell-integration-tests"))].
// column_alignment merged into spacing_edge_cases
pub mod approval_pty;
diff --git a/tests/integration_tests/post_start_commands.rs b/tests/integration_tests/post_start_commands.rs
index 3a299d1ab..865d27026 100644
--- a/tests/integration_tests/post_start_commands.rs
+++ b/tests/integration_tests/post_start_commands.rs
@@ -26,6 +26,8 @@ fn snapshot_switch(test_name: &str, repo: &TestRepo, args: &[&str]) {
settings.bind(|| {
let mut cmd = make_snapshot_cmd(repo, "switch", args, None);
cmd.env("HOME", temp_home.path());
+ // Windows: the `home` crate uses USERPROFILE for home_dir()
+ cmd.env("USERPROFILE", temp_home.path());
assert_cmd_snapshot!(test_name, cmd);
});
}
@@ -391,6 +393,8 @@ approved-commands = ["cat > context.json"]
.args(["switch", "--create", "feature-json"])
.current_dir(repo.root_path())
.env("HOME", temp_home.path())
+ // Windows: the `home` crate uses USERPROFILE for home_dir()
+ .env("USERPROFILE", temp_home.path())
.env("WORKTRUNK_CONFIG_PATH", repo.test_config_path())
.output()
.expect("failed to run wt switch");
@@ -446,6 +450,7 @@ approved-commands = ["cat > context.json"]
/// Test that an actual script file can read JSON from stdin
#[test]
+#[cfg(unix)]
fn test_post_create_script_reads_json() {
use crate::common::wt_command;
use std::os::unix::fs::PermissionsExt;
@@ -496,6 +501,8 @@ approved-commands = ["./scripts/setup.py"]
.args(["switch", "--create", "feature-script"])
.current_dir(repo.root_path())
.env("HOME", temp_home.path())
+ // Windows: the `home` crate uses USERPROFILE for home_dir()
+ .env("USERPROFILE", temp_home.path())
.env("WORKTRUNK_CONFIG_PATH", repo.test_config_path())
.output()
.expect("failed to run wt switch");
@@ -543,7 +550,10 @@ approved-commands = ["./scripts/setup.py"]
}
/// Test that background hooks also receive JSON context on stdin
+///
+/// Skipped on Windows: Uses `cat` command which is not available natively on Windows.
#[test]
+#[cfg_attr(windows, ignore)]
fn test_post_start_json_stdin() {
use crate::common::wt_command;
@@ -570,6 +580,8 @@ approved-commands = ["cat > context.json"]
.args(["switch", "--create", "bg-json"])
.current_dir(repo.root_path())
.env("HOME", temp_home.path())
+ // Windows: the `home` crate uses USERPROFILE for home_dir()
+ .env("USERPROFILE", temp_home.path())
.env("WORKTRUNK_CONFIG_PATH", repo.test_config_path())
.output()
.expect("failed to run wt switch");
diff --git a/tests/integration_tests/readme_sync.rs b/tests/integration_tests/readme_sync.rs
index 03b047093..c92d32ee9 100644
--- a/tests/integration_tests/readme_sync.rs
+++ b/tests/integration_tests/readme_sync.rs
@@ -6,6 +6,9 @@
//!
//! Run with: `cargo test --test integration readme_sync`
//!
+//! Skipped on Windows: These tests verify documentation sync using help output which has
+//! platform-specific formatting differences (clap markdown rendering, line endings).
+//!
//! ## Architecture
//!
//! The sync system uses a unified pipeline:
@@ -14,6 +17,7 @@
//! 2. **Placeholders**: `replace_placeholders()` normalizes test paths to display paths
//! 3. **Formatting**: `OutputFormat` enum controls the final output (plain text vs HTML)
//! 4. **Updating**: `update_section()` finds markers and replaces content
+#![cfg(not(windows))]
use ansi_to_html::convert as ansi_to_html;
use regex::Regex;
@@ -428,10 +432,34 @@ fn parse_snapshot_content_for_docs(content: &str) -> Result<String, String> {
let content = parse_snapshot_raw(content);
let content = replace_placeholders(&content);
let content = literal_to_escape(&content);
+ // Ensure each line ends with a reset so ansi-to-html produces clean per-line HTML.
+ // This handles snapshots where trailing resets were stripped for cross-platform consistency.
+ let content = ensure_line_resets(&content);
let html = ansi_to_html(&content).map_err(|e| format!("ANSI conversion failed: {e}"))?;
Ok(clean_ansi_html(&html))
}
+/// Ensure each line ends with a reset code so ansi-to-html produces clean per-line HTML
+///
+/// When trailing ANSI resets are stripped from snapshots for cross-platform consistency,
+/// the ansi-to-html library will carry styles across lines (e.g., `<b>text\nmore</b>`).
+/// By adding a reset at the end of each line, we ensure proper HTML tag closure.
+fn ensure_line_resets(ansi: &str) -> String {
+ const RESET: &str = "\x1b[0m";
+
+ ansi.lines()
+ .map(|line| {
+ // Add reset at end of line if it doesn't already end with one
+ if line.ends_with(RESET) {
+ line.to_string()
+ } else {
+ format!("{}{}", line, RESET)
+ }
+ })
+ .collect::<Vec<_>>()
+ .join("\n")
+}
+
/// Clean up HTML output from ansi-to-html conversion
fn clean_ansi_html(html: &str) -> String {
// Regex to remove empty HTML spans (e.g., <span style='opacity:0.67'></span>)
diff --git a/tests/integration_tests/remove.rs b/tests/integration_tests/remove.rs
index de952465c..e0de9f7df 100644
--- a/tests/integration_tests/remove.rs
+++ b/tests/integration_tests/remove.rs
@@ -497,7 +497,10 @@ fn test_remove_branch_matching_tree_content() {
/// 1. Linked worktrees can be removed (whether from within them or from elsewhere)
/// 2. The main worktree cannot be removed under any circumstances
/// 3. This is true regardless of which branch is checked out in the main worktree
+///
+/// Skipped on Windows: File locking prevents worktree removal during test execution.
#[test]
+#[cfg_attr(windows, ignore)]
fn test_remove_main_worktree_vs_linked_worktree() {
let mut repo = setup_remove_repo();
@@ -1028,7 +1031,10 @@ approved-commands = ["echo 'hook ran' > {}"]
///
/// Even when a worktree is in detached HEAD state (no branch), the pre-remove
/// hook should still execute.
+///
+/// Skipped on Windows: File locking prevents worktree removal during test execution.
#[test]
+#[cfg_attr(windows, ignore)]
fn test_pre_remove_hook_runs_for_detached_head() {
let mut repo = TestRepo::new();
repo.commit("Initial commit");
@@ -1122,7 +1128,10 @@ approved-commands = ["touch {marker_path}"]
/// (macOS temp paths are ~60 chars vs Linux ~20 chars). The snapshot version
/// of this test (`test_pre_remove_hook_runs_for_detached_head`) verifies the hook runs;
/// this test verifies the specific template expansion behavior.
+///
+/// Skipped on Windows: File locking prevents worktree removal during test execution.
#[test]
+#[cfg_attr(windows, ignore)]
fn test_pre_remove_hook_branch_expansion_detached_head() {
let mut repo = TestRepo::new();
repo.commit("Initial commit");
diff --git a/tests/integration_tests/select.rs b/tests/integration_tests/select.rs
index fa342f02e..8ae4f9930 100644
--- a/tests/integration_tests/select.rs
+++ b/tests/integration_tests/select.rs
@@ -1,3 +1,4 @@
+#![cfg(unix)]
//! TUI snapshot tests for `wt select`
//!
//! These tests use PTY execution combined with vt100 terminal emulation to capture
diff --git a/tests/integration_tests/statusline.rs b/tests/integration_tests/statusline.rs
index a58a551d7..f40d1eae1 100644
--- a/tests/integration_tests/statusline.rs
+++ b/tests/integration_tests/statusline.rs
@@ -140,11 +140,16 @@ fn claude_code_snapshot_settings(repo: &TestRepo) -> insta::Settings {
// We replace everything up to "repo" with [PATH]
settings.add_filter(r"(?m)^.*repo", "[PATH]");
// Also filter the raw path in case it appears
- settings.add_filter(&repo.root_path().display().to_string(), "[PATH]");
+ settings.add_filter(
+ &regex::escape(&repo.root_path().display().to_string()),
+ "[PATH]",
+ );
settings
}
+/// Skipped on Windows: JSON contains paths that need escaping on Windows.
#[test]
+#[cfg_attr(windows, ignore)]
fn test_statusline_claude_code_full_context() {
let repo = setup_repo_with_changes();
@@ -172,7 +177,9 @@ fn test_statusline_claude_code_full_context() {
});
}
+/// Skipped on Windows: JSON contains paths that need escaping on Windows.
#[test]
+#[cfg_attr(windows, ignore)]
fn test_statusline_claude_code_minimal() {
let repo = setup_basic_repo();
@@ -187,7 +194,9 @@ fn test_statusline_claude_code_minimal() {
});
}
+/// Skipped on Windows: JSON contains paths that need escaping on Windows.
#[test]
+#[cfg_attr(windows, ignore)]
fn test_statusline_claude_code_with_model() {
let repo = setup_basic_repo();
diff --git a/tests/integration_tests/switch.rs b/tests/integration_tests/switch.rs
index 2b873f708..5a9cd03d0 100644
--- a/tests/integration_tests/switch.rs
+++ b/tests/integration_tests/switch.rs
@@ -45,6 +45,8 @@ fn snapshot_switch_with_home(
settings.bind(|| {
let mut cmd = make_snapshot_cmd_with_global_flags(repo, "switch", args, None, global_flags);
cmd.env("HOME", home);
+ // Windows: the `home` crate uses USERPROFILE for home_dir()
+ cmd.env("USERPROFILE", home);
assert_cmd_snapshot!(test_name, cmd);
});
}
@@ -258,7 +260,9 @@ fn test_switch_execute_creates_file() {
);
}
+/// Skipped on Windows: Uses Unix shell command `exit 1`.
#[test]
+#[cfg_attr(windows, ignore)]
fn test_switch_execute_failure() {
let repo = setup_switch_repo();
@@ -615,6 +619,8 @@ fn snapshot_switch_from_dir(test_name: &str, repo: &TestRepo, args: &[&str], cwd
settings.bind(|| {
let mut cmd = make_snapshot_cmd_with_global_flags(repo, "switch", args, Some(cwd), &[]);
cmd.env("HOME", default_home.path());
+ // Windows: the `home` crate uses USERPROFILE for home_dir()
+ cmd.env("USERPROFILE", default_home.path());
assert_cmd_snapshot!(test_name, cmd);
});
}
@@ -685,7 +691,10 @@ fn test_switch_ping_pong_realistic() {
}
/// Test that `wt switch` without arguments shows helpful hints about shortcuts.
+///
+/// Skipped on Windows: Hints display differently on Windows.
#[test]
+#[cfg_attr(windows, ignore)]
fn test_switch_missing_argument_shows_hints() {
let repo = setup_switch_repo();
diff --git a/tests/integration_tests/user_hooks.rs b/tests/integration_tests/user_hooks.rs
index 74fbb35a2..cff64e2a9 100644
--- a/tests/integration_tests/user_hooks.rs
+++ b/tests/integration_tests/user_hooks.rs
@@ -521,7 +521,9 @@ fn snapshot_remove(test_name: &str, repo: &TestRepo, args: &[&str], cwd: Option<
});
}
+/// Skipped on Windows: Uses /tmp path and file locking prevents worktree removal.
#[test]
+#[cfg_attr(windows, ignore)]
fn test_user_pre_remove_hook_executes() {
let mut repo = TestRepo::new();
repo.commit("Initial commit");
diff --git a/tests/snapshots/integration__integration_tests__approval_ui__already_approved_skip_prompt.snap b/tests/snapshots/integration__integration_tests__approval_ui__already_approved_skip_prompt.snap
index 22760621f..7435af477 100644
--- a/tests/snapshots/integration__integration_tests__approval_ui__already_approved_skip_prompt.snap
+++ b/tests/snapshots/integration__integration_tests__approval_ui__already_approved_skip_prompt.snap
@@ -25,6 +25,6 @@ exit_code: 0
----- stderr -----
🔄 Running project post-create:
-  echo 'approved' > output.txt
+  echo 'approved' > output.txt
✅ Created new worktree for test-approved from main at [REPO].test-approved
💡 Run wt config shell install to enable automatic cd
diff --git a/tests/snapshots/integration__integration_tests__approval_ui__approval_fails_in_non_tty.snap b/tests/snapshots/integration__integration_tests__approval_ui__approval_fails_in_non_tty.snap
index 071817782..db9cee6a5 100644
--- a/tests/snapshots/integration__integration_tests__approval_ui__approval_fails_in_non_tty.snap
+++ b/tests/snapshots/integration__integration_tests__approval_ui__approval_fails_in_non_tty.snap
@@ -27,7 +27,7 @@ exit_code: 1
🟡 repo needs approval to execute 1 command:
⚪ post-create:
-  echo 'test command'
+  echo 'test command'
❌ Cannot prompt for approval in non-interactive environment
💡 In CI/CD, use --force to skip prompts. To pre-approve commands, use wt hook approvals add
diff --git a/tests/snapshots/integration__integration_tests__approval_ui__approval_mixed_approved_unapproved.snap b/tests/snapshots/integration__integration_tests__approval_ui__approval_mixed_approved_unapproved.snap
index db2de9676..c0098a114 100644
--- a/tests/snapshots/integration__integration_tests__approval_ui__approval_mixed_approved_unapproved.snap
+++ b/tests/snapshots/integration__integration_tests__approval_ui__approval_mixed_approved_unapproved.snap
@@ -9,9 +9,9 @@ exit_code: 1
🟡 repo needs approval to execute 2 commands:
⚪ post-create first:
-  echo 'First command'
+  echo 'First command'
⚪ post-create third:
-  echo 'Third command'
+  echo 'Third command'
❌ Cannot prompt for approval in non-interactive environment
💡 In CI/CD, use --force to skip prompts. To pre-approve commands, use wt hook approvals add
diff --git a/tests/snapshots/integration__integration_tests__approval_ui__approval_multiple_commands.snap b/tests/snapshots/integration__integration_tests__approval_ui__approval_multiple_commands.snap
index 8c6e3cb69..914562faf 100644
--- a/tests/snapshots/integration__integration_tests__approval_ui__approval_multiple_commands.snap
+++ b/tests/snapshots/integration__integration_tests__approval_ui__approval_multiple_commands.snap
@@ -9,13 +9,13 @@ exit_code: 1
🟡 repo needs approval to execute 4 commands:
⚪ post-create branch:
-  echo 'Branch: {{ branch }}'
+  echo 'Branch: {{ branch }}'
⚪ post-create worktree:
-  echo 'Worktree: {{ worktree }}'
+  echo 'Worktree: {{ worktree }}'
⚪ post-create repo:
-  echo 'Repo: {{ main_worktree }}'
+  echo 'Repo: {{ main_worktree }}'
⚪ post-create pwd:
-  cd {{ worktree }} && pwd
+  cd {{ worktree }} && pwd
❌ Cannot prompt for approval in non-interactive environment
💡 In CI/CD, use --force to skip prompts. To pre-approve commands, use wt hook approvals add
diff --git a/tests/snapshots/integration__integration_tests__approval_ui__approval_named_commands.snap b/tests/snapshots/integration__integration_tests__approval_ui__approval_named_commands.snap
index cc86913cc..7bdd45031 100644
--- a/tests/snapshots/integration__integration_tests__approval_ui__approval_named_commands.snap
+++ b/tests/snapshots/integration__integration_tests__approval_ui__approval_named_commands.snap
@@ -9,11 +9,11 @@ exit_code: 1
🟡 repo needs approval to execute 3 commands:
⚪ post-create install:
-  echo 'Installing dependencies...'
+  echo 'Installing dependencies...'
⚪ post-create build:
-  echo 'Building project...'
+  echo 'Building project...'
⚪ post-create test:
-  echo 'Running tests...'
+  echo 'Running tests...'
❌ Cannot prompt for approval in non-interactive environment
💡 In CI/CD, use --force to skip prompts. To pre-approve commands, use wt hook approvals add
diff --git a/tests/snapshots/integration__integration_tests__approval_ui__approval_single_command.snap b/tests/snapshots/integration__integration_tests__approval_ui__approval_single_command.snap
index d26f179da..cca23b423 100644
--- a/tests/snapshots/integration__integration_tests__approval_ui__approval_single_command.snap
+++ b/tests/snapshots/integration__integration_tests__approval_ui__approval_single_command.snap
@@ -9,7 +9,7 @@ exit_code: 1
🟡 repo needs approval to execute 1 command:
⚪ post-create:
-  echo 'Worktree path: {{ worktree }}'
+  echo 'Worktree path: {{ worktree }}'
❌ Cannot prompt for approval in non-interactive environment
💡 In CI/CD, use --force to skip prompts. To pre-approve commands, use wt hook approvals add
diff --git a/tests/snapshots/integration__integration_tests__approval_ui__decline_approval_skips_only_unapproved.snap b/tests/snapshots/integration__integration_tests__approval_ui__decline_approval_skips_only_unapproved.snap
index db2de9676..c0098a114 100644
--- a/tests/snapshots/integration__integration_tests__approval_ui__decline_approval_skips_only_unapproved.snap
+++ b/tests/snapshots/integration__integration_tests__approval_ui__decline_approval_skips_only_unapproved.snap
@@ -9,9 +9,9 @@ exit_code: 1
🟡 repo needs approval to execute 2 commands:
⚪ post-create first:
-  echo 'First command'
+  echo 'First command'
⚪ post-create third:
-  echo 'Third command'
+  echo 'Third command'
❌ Cannot prompt for approval in non-interactive environment
💡 In CI/CD, use --force to skip prompts. To pre-approve commands, use wt hook approvals add
diff --git a/tests/snapshots/integration__integration_tests__approval_ui__force_bypasses_tty_check.snap b/tests/snapshots/integration__integration_tests__approval_ui__force_bypasses_tty_check.snap
index 73894efbe..2910f661c 100644
--- a/tests/snapshots/integration__integration_tests__approval_ui__force_bypasses_tty_check.snap
+++ b/tests/snapshots/integration__integration_tests__approval_ui__force_bypasses_tty_check.snap
@@ -26,7 +26,7 @@ exit_code: 0
----- stderr -----
🔄 Running project post-create:
-  echo 'test command'
+  echo 'test command'
test command
✅ Created new worktree for test-force-tty from main at [REPO].test-force-tty
💡 Run wt config shell install to enable automatic cd
diff --git a/tests/snapshots/integration__integration_tests__approval_ui__force_does_not_save_approvals_first_run.snap b/tests/snapshots/integration__integration_tests__approval_ui__force_does_not_save_approvals_first_run.snap
index b517ac0f9..9520a818a 100644
--- a/tests/snapshots/integration__integration_tests__approval_ui__force_does_not_save_approvals_first_run.snap
+++ b/tests/snapshots/integration__integration_tests__approval_ui__force_does_not_save_approvals_first_run.snap
@@ -26,6 +26,6 @@ exit_code: 0
----- stderr -----
🔄 Running project post-create:
-  echo 'test command' > output.txt
+  echo 'test command' > output.txt
✅ Created new worktree for test-force from main at [REPO].test-force
💡 Run wt config shell install to enable automatic cd
diff --git a/tests/snapshots/integration__integration_tests__approval_ui__force_does_not_save_approvals_second_run.snap b/tests/snapshots/integration__integration_tests__approval_ui__force_does_not_save_approvals_second_run.snap
index f69bc8de7..17b1d3bbf 100644
--- a/tests/snapshots/integration__integration_tests__approval_ui__force_does_not_save_approvals_second_run.snap
+++ b/tests/snapshots/integration__integration_tests__approval_ui__force_does_not_save_approvals_second_run.snap
@@ -9,7 +9,7 @@ exit_code: 1
🟡 repo needs approval to execute 1 command:
⚪ post-create:
-  echo 'test command' > output.txt
+  echo 'test command' > output.txt
❌ Cannot prompt for approval in non-interactive environment
💡 In CI/CD, use --force to skip prompts. To pre-approve commands, use wt hook approvals add
diff --git a/tests/snapshots/integration__integration_tests__approval_ui__run_hook_post_merge_requires_approval.snap b/tests/snapshots/integration__integration_tests__approval_ui__run_hook_post_merge_requires_approval.snap
index 196c7dd2f..d2c963836 100644
--- a/tests/snapshots/integration__integration_tests__approval_ui__run_hook_post_merge_requires_approval.snap
+++ b/tests/snapshots/integration__integration_tests__approval_ui__run_hook_post_merge_requires_approval.snap
@@ -9,7 +9,7 @@ exit_code: 1
🟡 repo needs approval to execute 1 command:
⚪ post-merge:
-  echo 'Post-merge cleanup for {{ branch }}'
+  echo 'Post-merge cleanup for {{ branch }}'
❌ Cannot prompt for approval in non-interactive environment
💡 In CI/CD, use --force to skip prompts. To pre-approve commands, use wt hook approvals add
diff --git a/tests/snapshots/integration__integration_tests__approval_ui__run_hook_pre_merge_requires_approval.snap b/tests/snapshots/integration__integration_tests__approval_ui__run_hook_pre_merge_requires_approval.snap
index 256c5f6ce..b18572282 100644
--- a/tests/snapshots/integration__integration_tests__approval_ui__run_hook_pre_merge_requires_approval.snap
+++ b/tests/snapshots/integration__integration_tests__approval_ui__run_hook_pre_merge_requires_approval.snap
@@ -9,7 +9,7 @@ exit_code: 1
🟡 repo needs approval to execute 1 command:
⚪ pre-merge:
-  echo 'Running pre-merge checks on {{ branch }}'
+  echo 'Running pre-merge checks on {{ branch }}'
❌ Cannot prompt for approval in non-interactive environment
💡 In CI/CD, use --force to skip prompts. To pre-approve commands, use wt hook approvals add
diff --git a/tests/snapshots/integration__integration_tests__approvals__add_approvals_all_none_approved.snap b/tests/snapshots/integration__integration_tests__approvals__add_approvals_all_none_approved.snap
index ef1a8f354..a9e9816a3 100644
--- a/tests/snapshots/integration__integration_tests__approvals__add_approvals_all_none_approved.snap
+++ b/tests/snapshots/integration__integration_tests__approvals__add_approvals_all_none_approved.snap
@@ -28,7 +28,7 @@ exit_code: 1
🟡 repo needs approval to execute 1 command:
⚪ post-create:
-  echo 'test'
+  echo 'test'
❌ Cannot prompt for approval in non-interactive environment
💡 In CI/CD, use --force to skip prompts. To pre-approve commands, use wt hook approvals add
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_doctor_command_not_found.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_doctor_command_not_found.snap
index 16e0616b3..240d73ff7 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_doctor_command_not_found.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_doctor_command_not_found.snap
@@ -7,6 +7,7 @@ info:
- show
- "--doctor"
env:
+ APPDATA: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpaIcCCZ/.config
CLICOLOR_FORCE: "1"
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
@@ -18,6 +19,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
@@ -27,10 +29,10 @@ exit_code: 0
----- stderr -----
USER CONFIG ~/.config/worktrunk/config.toml
-  worktree-path = "../{{ main_worktree }}.{{ branch }}"
+  worktree-path = "../{{ main_worktree }}.{{ branch }}"
 
-  [commit-generation]
-  command = "nonexistent-llm-command-12345"
+  [commit-generation]
+  command = "nonexistent-llm-command-12345"
  args = ["-m", "test-model"]
PROJECT CONFIG [REPO]/.config/wt.toml
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_doctor_not_configured.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_doctor_not_configured.snap
index b3fbc137e..9351f64c3 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_doctor_not_configured.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_doctor_not_configured.snap
@@ -7,6 +7,7 @@ info:
- show
- "--doctor"
env:
+ APPDATA: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpH4nLBV/.config
CLICOLOR_FORCE: "1"
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
@@ -18,6 +19,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
@@ -27,7 +29,7 @@ exit_code: 0
----- stderr -----
USER CONFIG ~/.config/worktrunk/config.toml
-  worktree-path = "../{{ main_worktree }}.{{ branch }}"
+  worktree-path = "../{{ main_worktree }}.{{ branch }}"
PROJECT CONFIG [REPO]/.config/wt.toml
💡 Not found
diff --git a/tests/snapshots/integration__integration_tests__directives__merge_internal_no_remove.snap b/tests/snapshots/integration__integration_tests__directives__merge_internal_no_remove.snap
index d4850ebc6..a163de7f7 100644
--- a/tests/snapshots/integration__integration_tests__directives__merge_internal_no_remove.snap
+++ b/tests/snapshots/integration__integration_tests__directives__merge_internal_no_remove.snap
@@ -31,4 +31,3 @@ exit_code: 0
  1 file changed, 1 insertion(+)
✅ Merged to main (1 commit, 1 file, +1)
⚪ Worktree preserved (--no-remove)
-
diff --git a/tests/snapshots/integration__integration_tests__directives__merge_internal_powershell_directive.snap b/tests/snapshots/integration__integration_tests__directives__merge_internal_powershell_directive.snap
new file mode 100644
index 000000000..55124bd25
--- /dev/null
+++ b/tests/snapshots/integration__integration_tests__directives__merge_internal_powershell_directive.snap
@@ -0,0 +1,33 @@
+---
+source: tests/integration_tests/directives.rs
+info:
+ program: wt
+ args:
+ - "--internal=powershell"
+ - merge
+ - main
+ env:
+ CLICOLOR_FORCE: "1"
+ COLUMNS: "150"
+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
+ GIT_CONFIG_SYSTEM: /dev/null
+ GIT_EDITOR: ""
+ LANG: C
+ LC_ALL: C
+ SOURCE_DATE_EPOCH: "1735776000"
+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+---
+success: true
+exit_code: 0
+----- stdout -----
+Set-Location '[PATH]'
+
+----- stderr -----
+🔄 Merging 1 commit to main @ 6551244 (no commit/squash/rebase needed)
+  * 6551244 Add feature file
+  feature.txt | 1 +
+  1 file changed, 1 insertion(+)
+✅ Merged to main (1 commit, 1 file, +1)
+🔄 Removing feature worktree & branch in background (already in main)
diff --git a/tests/snapshots/integration__integration_tests__directives__merge_internal_remove.snap b/tests/snapshots/integration__integration_tests__directives__merge_internal_remove.snap
index c11d98ff8..5e792af90 100644
--- a/tests/snapshots/integration__integration_tests__directives__merge_internal_remove.snap
+++ b/tests/snapshots/integration__integration_tests__directives__merge_internal_remove.snap
@@ -31,4 +31,3 @@ cd '[PATH]'
  1 file changed, 1 insertion(+)
✅ Merged to main (1 commit, 1 file, +1)
🔄 Removing feature worktree & branch in background (already in main)
-
diff --git a/tests/snapshots/integration__integration_tests__directives__remove_internal_powershell_directive.snap b/tests/snapshots/integration__integration_tests__directives__remove_internal_powershell_directive.snap
new file mode 100644
index 000000000..424a793cd
--- /dev/null
+++ b/tests/snapshots/integration__integration_tests__directives__remove_internal_powershell_directive.snap
@@ -0,0 +1,27 @@
+---
+source: tests/integration_tests/directives.rs
+info:
+ program: wt
+ args:
+ - "--internal=powershell"
+ - remove
+ env:
+ CLICOLOR_FORCE: "1"
+ COLUMNS: "150"
+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
+ GIT_CONFIG_SYSTEM: /dev/null
+ GIT_EDITOR: ""
+ LANG: C
+ LC_ALL: C
+ SOURCE_DATE_EPOCH: "1735776000"
+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+---
+success: true
+exit_code: 0
+----- stdout -----
+Set-Location '[PATH]'
+
+----- stderr -----
+🔄 Removing feature worktree & branch in background (already in main)
diff --git a/tests/snapshots/integration__integration_tests__directives__switch_internal_powershell_directive.snap b/tests/snapshots/integration__integration_tests__directives__switch_internal_powershell_directive.snap
new file mode 100644
index 000000000..bbf9d9380
--- /dev/null
+++ b/tests/snapshots/integration__integration_tests__directives__switch_internal_powershell_directive.snap
@@ -0,0 +1,28 @@
+---
+source: tests/integration_tests/directives.rs
+info:
+ program: wt
+ args:
+ - "--internal=powershell"
+ - switch
+ - feature
+ env:
+ CLICOLOR_FORCE: "1"
+ COLUMNS: "150"
+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
+ GIT_CONFIG_SYSTEM: /dev/null
+ GIT_EDITOR: ""
+ LANG: C
+ LC_ALL: C
+ SOURCE_DATE_EPOCH: "1735776000"
+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+---
+success: true
+exit_code: 0
+----- stdout -----
+Set-Location '[PATH]'
+
+----- stderr -----
+✅ Switched to worktree for feature at [REPO].feature
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_create.snap b/tests/snapshots/integration__integration_tests__help__help_config_create.snap
index 98f73e381..959aca3e8 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_create.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_create.snap
@@ -20,327 +20,327 @@ exit_code: 0
----- stderr -----
wt config create - Create configuration file
-Usage: wt config create [OPTIONS]
+Usage: wt config create [OPTIONS]
-Options:
- --project
+Options:
+ --project
Create project config (.config/wt.toml) instead of user config
- -h, --help
+ -h, --help
Print help (see a summary with '-h')
-Global Options:
- -C <path>
+Global Options:
+ -C <path>
Working directory for this command
- --config <path>
+ --config <path>
User config file path
- -v, --verbose
+ -v, --verbose
Show commands and debug info
-User config
+User config
Creates ~/.config/worktrunk/config.toml with the following content:
- # Worktrunk Global Configuration
- # Copy to: ~/.config/worktrunk/config.toml (or use `wt config create`)
- #
- # Alternative locations (XDG Base Directory spec):
- # macOS/Linux: $XDG_CONFIG_HOME/worktrunk/config.toml
- # Windows: %APPDATA%\worktrunk\config.toml
- 
- # Commit Message Generation (Optional)
- # For generating commit messages during merge operations (wt merge)
- [commit-generation]
- # Example: Simon Willison's llm CLI (https://github.com/simonw/llm)
- # Install: pip install llm llm-anthropic
- command = "llm"
- args = ["-m", "claude-haiku-4.5"]
- 
- # Alternative: AIChat - Rust-based, supports 20+ providers
- # Install from: https://github.com/sigoden/aichat
- # command = "aichat"
- # args = ["-m", "claude:claude-haiku-4.5"]
- 
- # Optional: Load template from file (mutually exclusive with 'template')
- # Supports ~ expansion: ~/.config/worktrunk/commit-template.txt
- # template-file = "~/.config/worktrunk/commit-template.txt"
- 
- # Optional: Load squash template from file (mutually exclusive with 'squash-template')
- # Supports ~ expansion: ~/.config/worktrunk/squash-template.txt
- # squash-template-file = "~/.config/worktrunk/squash-template.txt"
- 
- # See "Custom Prompt Templates" section at end of file for inline template options.
- 
- # Worktree Path Template
- # Variables:
- # {{ main_worktree }} - Main worktree directory name (e.g., "myproject")
- # {{ branch }} - Branch name with slashes replaced by dashes (feature/auth → feature-auth)
- #
- # Paths are relative to the main worktree root (original repository directory).
- #
- # Example paths created (main worktree at /Users/dev/myproject, branch feature/auth):
- # "../{{ main_worktree }}.{{ branch }}" → /Users/dev/myproject.feature-auth
- # ".worktrees/{{ branch }}" → /Users/dev/myproject/.worktrees/feature-auth
- worktree-path = "../{{ main_worktree }}.{{ branch }}"
- 
- # Alternative: Inside repo (useful for bare repos)
- # worktree-path = ".worktrees/{{ branch }}"
- 
- # List Command Defaults
- # Configure default behavior for `wt list`
- [list]
- full = false # Show CI and `main` diffstat by default
- branches = false # Include branches without worktrees by default
- remotes = false # Include remote branches by default
- 
- # Commit Defaults (shared by `wt step commit`, `wt step squash`, and `wt merge`)
- [commit]
- stage = "all" # What to stage: "all", "tracked", or "none"
- 
- # Merge Command Defaults
- # Note: `stage` defaults from [commit] section above
- [merge]
- squash = true # Squash commits when merging
- commit = true # Commit, squash, and rebase during merge
- remove = true # Remove worktree after merge
- verify = true # Run project hooks
- 
- # Approved Commands
- # Commands approved for automatic execution after switching worktrees
- # Auto-populated when you use: wt switch --execute "command" --force
- [projects."github.com/user/repo"]
- approved-commands = ["npm install"]
- 
- # NOTE: For project-specific hooks (post-create, post-start, pre-merge, etc.),
- # use a separate PROJECT config file at <repo>/.config/wt.toml
- # Run `wt config create --project` to create one, or see https://worktrunk.dev/hooks/
- 
- # ============================================================================
- # Custom Prompt Templates (Advanced)
- # ============================================================================
- # These options belong under [commit-generation] section above.
- # NOTE: Templates are synced from src/llm.rs by `cargo test readme_sync`
- 
- # Optional: Custom prompt template (inline) - Uses minijinja syntax
- # Available variables: {{ git_diff }}, {{ branch }}, {{ recent_commits }}, {{ repo }}
- # If not specified, uses the default template shown below:
- # <!-- DEFAULT_TEMPLATE_START -->
- # template = """
- # Write a commit message for the staged changes below.
- #
- # <format>
- # - Subject under 50 chars, blank line, then optional body
- # - Output only the commit message, no quotes or code blocks
- # </format>
- #
- # <style>
- # - Imperative mood: "Add feature" not "Added feature"
- # - Match recent commit style (conventional commits if used)
- # - Describe the change, not the intent or benefit
- # </style>
- #
- # <diff>
- # {{ git_diff }}
- # </diff>
- #
- # <context>
- # Branch: {{ branch }}
- # {% if recent_commits %}<recent_commits>
- # {% for commit in recent_commits %}- {{ commit }}
- # {% endfor %}</recent_commits>{% endif %}
- # </context>
- # """
- # <!-- DEFAULT_TEMPLATE_END -->
- #
- # Example alternative template with different style:
- # template = """
- # Generate a commit message for {{ repo | upper }}.
- #
- # Branch: {{ branch }}
- # {%- if recent_commits %}
- #
- # Recent commit style ({{ recent_commits | length }} commits):
- # {%- for commit in recent_commits %}
- # {{ loop.index }}. {{ commit }}
- # {%- endfor %}
- # {%- endif %}
- #
- # Changes to commit:
- # ```
- # {{ git_diff }}
- # ```
- #
- # Requirements:
- # - Follow the style of recent commits above
- # - First line under 50 chars
- # - Focus on WHY, not HOW
- # """
- 
- # Optional: Custom squash commit message template (inline) - Uses minijinja syntax
- # Available variables: {{ git_diff }}, {{ branch }}, {{ recent_commits }}, {{ repo }}, {{ commits }}, {{ target_branch }}
- # If not specified, uses the default template:
- # <!-- DEFAULT_SQUASH_TEMPLATE_START -->
- # squash-template = """
- # Combine these commits into a single commit message.
- #
- # <format>
- # - Subject under 50 chars, blank line, then optional body
- # - Output only the commit message, no quotes or code blocks
- # </format>
- #
- # <style>
- # - Imperative mood: "Add feature" not "Added feature"
- # - Match the style of commits being squashed (conventional commits if used)
- # - Describe the change, not the intent or benefit
- # </style>
- #
- # <commits branch="{{ branch }}" target="{{ target_branch }}">
- # {% for commit in commits %}- {{ commit }}
- # {% endfor %}</commits>
- #
- # <diff>
- # {{ git_diff }}
- # </diff>
- # """
- # <!-- DEFAULT_SQUASH_TEMPLATE_END -->
- #
- # Example alternative template:
- # squash-template = """
- # Squashing {{ commits | length }} commit(s) from {{ branch }} to {{ target_branch }}.
- #
- # {% if commits | length > 1 -%}
- # Commits being combined:
- # {%- for c in commits %}
- # {{ loop.index }}/{{ loop.length }}: {{ c }}
- # {%- endfor %}
- # {%- else -%}
- # Single commit: {{ commits[0] }}
- # {%- endif %}
- #
- # Generate one cohesive commit message that captures the overall change.
- # Use conventional commit format (feat/fix/docs/refactor).
- # """
+ # Worktrunk Global Configuration
+ # Copy to: ~/.config/worktrunk/config.toml (or use `wt config create`)
+ #
+ # Alternative locations (XDG Base Directory spec):
+ # macOS/Linux: $XDG_CONFIG_HOME/worktrunk/config.toml
+ # Windows: %APPDATA%\worktrunk\config.toml
+ 
+ # Commit Message Generation (Optional)
+ # For generating commit messages during merge operations (wt merge)
+ [commit-generation]
+ # Example: Simon Willison's llm CLI (https://github.com/simonw/llm)
+ # Install: pip install llm llm-anthropic
+ command = "llm"
+ args = ["-m", "claude-haiku-4.5"]
+ 
+ # Alternative: AIChat - Rust-based, supports 20+ providers
+ # Install from: https://github.com/sigoden/aichat
+ # command = "aichat"
+ # args = ["-m", "claude:claude-haiku-4.5"]
+ 
+ # Optional: Load template from file (mutually exclusive with 'template')
+ # Supports ~ expansion: ~/.config/worktrunk/commit-template.txt
+ # template-file = "~/.config/worktrunk/commit-template.txt"
+ 
+ # Optional: Load squash template from file (mutually exclusive with 'squash-template')
+ # Supports ~ expansion: ~/.config/worktrunk/squash-template.txt
+ # squash-template-file = "~/.config/worktrunk/squash-template.txt"
+ 
+ # See "Custom Prompt Templates" section at end of file for inline template options.
+ 
+ # Worktree Path Template
+ # Variables:
+ # {{ main_worktree }} - Main worktree directory name (e.g., "myproject")
+ # {{ branch }} - Branch name with slashes replaced by dashes (feature/auth → feature-auth)
+ #
+ # Paths are relative to the main worktree root (original repository directory).
+ #
+ # Example paths created (main worktree at /Users/dev/myproject, branch feature/auth):
+ # "../{{ main_worktree }}.{{ branch }}" → /Users/dev/myproject.feature-auth
+ # ".worktrees/{{ branch }}" → /Users/dev/myproject/.worktrees/feature-auth
+ worktree-path = "../{{ main_worktree }}.{{ branch }}"
+ 
+ # Alternative: Inside repo (useful for bare repos)
+ # worktree-path = ".worktrees/{{ branch }}"
+ 
+ # List Command Defaults
+ # Configure default behavior for `wt list`
+ [list]
+ full = false # Show CI and `main` diffstat by default
+ branches = false # Include branches without worktrees by default
+ remotes = false # Include remote branches by default
+ 
+ # Commit Defaults (shared by `wt step commit`, `wt step squash`, and `wt merge`)
+ [commit]
+ stage = "all" # What to stage: "all", "tracked", or "none"
+ 
+ # Merge Command Defaults
+ # Note: `stage` defaults from [commit] section above
+ [merge]
+ squash = true # Squash commits when merging
+ commit = true # Commit, squash, and rebase during merge
+ remove = true # Remove worktree after merge
+ verify = true # Run project hooks
+ 
+ # Approved Commands
+ # Commands approved for automatic execution after switching worktrees
+ # Auto-populated when you use: wt switch --execute "command" --force
+ [projects."github.com/user/repo"]
+ approved-commands = ["npm install"]
+ 
+ # NOTE: For project-specific hooks (post-create, post-start, pre-merge, etc.),
+ # use a separate PROJECT config file at <repo>/.config/wt.toml
+ # Run `wt config create --project` to create one, or see https://worktrunk.dev/hooks/
+ 
+ # ============================================================================
+ # Custom Prompt Templates (Advanced)
+ # ============================================================================
+ # These options belong under [commit-generation] section above.
+ # NOTE: Templates are synced from src/llm.rs by `cargo test readme_sync`
+ 
+ # Optional: Custom prompt template (inline) - Uses minijinja syntax
+ # Available variables: {{ git_diff }}, {{ branch }}, {{ recent_commits }}, {{ repo }}
+ # If not specified, uses the default template shown below:
+ # <!-- DEFAULT_TEMPLATE_START -->
+ # template = """
+ # Write a commit message for the staged changes below.
+ #
+ # <format>
+ # - Subject under 50 chars, blank line, then optional body
+ # - Output only the commit message, no quotes or code blocks
+ # </format>
+ #
+ # <style>
+ # - Imperative mood: "Add feature" not "Added feature"
+ # - Match recent commit style (conventional commits if used)
+ # - Describe the change, not the intent or benefit
+ # </style>
+ #
+ # <diff>
+ # {{ git_diff }}
+ # </diff>
+ #
+ # <context>
+ # Branch: {{ branch }}
+ # {% if recent_commits %}<recent_commits>
+ # {% for commit in recent_commits %}- {{ commit }}
+ # {% endfor %}</recent_commits>{% endif %}
+ # </context>
+ # """
+ # <!-- DEFAULT_TEMPLATE_END -->
+ #
+ # Example alternative template with different style:
+ # template = """
+ # Generate a commit message for {{ repo | upper }}.
+ #
+ # Branch: {{ branch }}
+ # {%- if recent_commits %}
+ #
+ # Recent commit style ({{ recent_commits | length }} commits):
+ # {%- for commit in recent_commits %}
+ # {{ loop.index }}. {{ commit }}
+ # {%- endfor %}
+ # {%- endif %}
+ #
+ # Changes to commit:
+ # ```
+ # {{ git_diff }}
+ # ```
+ #
+ # Requirements:
+ # - Follow the style of recent commits above
+ # - First line under 50 chars
+ # - Focus on WHY, not HOW
+ # """
+ 
+ # Optional: Custom squash commit message template (inline) - Uses minijinja syntax
+ # Available variables: {{ git_diff }}, {{ branch }}, {{ recent_commits }}, {{ repo }}, {{ commits }}, {{ target_branch }}
+ # If not specified, uses the default template:
+ # <!-- DEFAULT_SQUASH_TEMPLATE_START -->
+ # squash-template = """
+ # Combine these commits into a single commit message.
+ #
+ # <format>
+ # - Subject under 50 chars, blank line, then optional body
+ # - Output only the commit message, no quotes or code blocks
+ # </format>
+ #
+ # <style>
+ # - Imperative mood: "Add feature" not "Added feature"
+ # - Match the style of commits being squashed (conventional commits if used)
+ # - Describe the change, not the intent or benefit
+ # </style>
+ #
+ # <commits branch="{{ branch }}" target="{{ target_branch }}">
+ # {% for commit in commits %}- {{ commit }}
+ # {% endfor %}</commits>
+ #
+ # <diff>
+ # {{ git_diff }}
+ # </diff>
+ # """
+ # <!-- DEFAULT_SQUASH_TEMPLATE_END -->
+ #
+ # Example alternative template:
+ # squash-template = """
+ # Squashing {{ commits | length }} commit(s) from {{ branch }} to {{ target_branch }}.
+ #
+ # {% if commits | length > 1 -%}
+ # Commits being combined:
+ # {%- for c in commits %}
+ # {{ loop.index }}/{{ loop.length }}: {{ c }}
+ # {%- endfor %}
+ # {%- else -%}
+ # Single commit: {{ commits[0] }}
+ # {%- endif %}
+ #
+ # Generate one cohesive commit message that captures the overall change.
+ # Use conventional commit format (feat/fix/docs/refactor).
+ # """
-Project config
+Project config
With --project, creates .config/wt.toml in the current repository:
- # Worktrunk Project Configuration
- # Copy to: <repo>/.config/wt.toml
- #
- # This file defines project-specific hooks that run automatically during
- # worktree operations. It should be checked into git and shared across all
- # developers working on the project.
- 
- # Available template variables (all hooks):
- # {{ repo }} - Repository name (e.g., "my-project")
- # {{ branch }} - Branch name (slashes replaced with dashes)
- # {{ worktree }} - Absolute path to the worktree
- # {{ repo_root }} - Absolute path to the repository root
- #
- # Merge-related hooks also support:
- # {{ target }} - Target branch for the merge (e.g., "main")
- 
- # Post-Create Hook
- # Runs SEQUENTIALLY and BLOCKS until complete
- # The worktree switch won't complete until these finish
- # Commands run one after another in the worktree directory
- #
- # Format options:
- # 1. Single string:
- # post-create = "npm install"
- #
- # 2. Named table (runs sequentially in declaration order):
- # [post-create]
- # install = "npm install --frozen-lockfile"
- # build = "npm run build"
- 
- # Post-Start Hook
- # Runs in BACKGROUND as detached processes (parallel)
- # Use for: uv sync, npm install, bundle install, build, dev servers, file watchers,
- # downloading assets too large for git (images, ML models, binaries), long-running tasks
- # The worktree switch completes immediately, these run in parallel
- # Output is logged to .git/wt-logs/{branch}-{source}-post-start-{name}.log (source: user/project)
- #
- # Format options:
- # 1. Single string:
- # post-start = "npm run dev"
- #
- # 2. Named table (runs in parallel):
- # [post-start]
- # server = "npm run dev"
- # watch = "npm run watch"
- 
- # Pre-Commit Hook
- # Runs SEQUENTIALLY before committing changes during merge (blocking, fail-fast)
- # All commands must exit with code 0 for commit to proceed
- # Runs for both squash and no-squash merge modes
- # Use for: formatters, linters, quick validation
- #
- # Single command:
- # pre-commit = "cargo fmt -- --check"
- #
- # Multiple commands:
- # [pre-commit]
- # format = "cargo fmt -- --check"
- # lint = "cargo clippy -- -D warnings"
- 
- # Pre-Merge Hook
- # Runs SEQUENTIALLY before merging to target branch (blocking, fail-fast)
- # All commands must exit with code 0 for merge to proceed
- # Use for: tests, linters, build verification before merging
- #
- # Single command:
- # pre-merge = "cargo test"
- #
- # Multiple commands:
- # [pre-merge]
- # test = "cargo test"
- # build = "cargo build --release"
- 
- # Post-Merge Hook
- # Runs SEQUENTIALLY in the main worktree after successful merge (blocking)
- # Runs after push and cleanup complete
- # Use for: updating production builds, notifications, cleanup
- #
- # Single command:
- # post-merge = "cargo install --path ."
- #
- # Multiple commands:
- # [post-merge]
- # install = "cargo install --path ."
- # notify = "echo 'Merged!'"
- 
- # Example: Node.js Project
- # [post-create]
- # install = "npm ci"
- #
- # [post-start]
- # server = "npm run dev"
- #
- # [pre-merge]
- # lint = "npm run lint"
- # test = "npm test"
- 
- # Example: Rust Project
- # [post-create]
- # build = "cargo build"
- #
- # [pre-merge]
- # format = "cargo fmt -- --check"
- # clippy = "cargo clippy -- -D warnings"
- # test = "cargo test"
- #
- # post-merge = "cargo install --path ."
- 
- # Example: Python Project
- # [post-create]
- # venv = "python -m venv .venv"
- # install = ".venv/bin/pip install -r requirements.txt"
- #
- # [pre-merge]
- # format = ".venv/bin/black --check ."
- # lint = ".venv/bin/ruff check ."
- # test = ".venv/bin/pytest"
+ # Worktrunk Project Configuration
+ # Copy to: <repo>/.config/wt.toml
+ #
+ # This file defines project-specific hooks that run automatically during
+ # worktree operations. It should be checked into git and shared across all
+ # developers working on the project.
+ 
+ # Available template variables (all hooks):
+ # {{ repo }} - Repository name (e.g., "my-project")
+ # {{ branch }} - Branch name (slashes replaced with dashes)
+ # {{ worktree }} - Absolute path to the worktree
+ # {{ repo_root }} - Absolute path to the repository root
+ #
+ # Merge-related hooks also support:
+ # {{ target }} - Target branch for the merge (e.g., "main")
+ 
+ # Post-Create Hook
+ # Runs SEQUENTIALLY and BLOCKS until complete
+ # The worktree switch won't complete until these finish
+ # Commands run one after another in the worktree directory
+ #
+ # Format options:
+ # 1. Single string:
+ # post-create = "npm install"
+ #
+ # 2. Named table (runs sequentially in declaration order):
+ # [post-create]
+ # install = "npm install --frozen-lockfile"
+ # build = "npm run build"
+ 
+ # Post-Start Hook
+ # Runs in BACKGROUND as detached processes (parallel)
+ # Use for: uv sync, npm install, bundle install, build, dev servers, file watchers,
+ # downloading assets too large for git (images, ML models, binaries), long-running tasks
+ # The worktree switch completes immediately, these run in parallel
+ # Output is logged to .git/wt-logs/{branch}-{source}-post-start-{name}.log (source: user/project)
+ #
+ # Format options:
+ # 1. Single string:
+ # post-start = "npm run dev"
+ #
+ # 2. Named table (runs in parallel):
+ # [post-start]
+ # server = "npm run dev"
+ # watch = "npm run watch"
+ 
+ # Pre-Commit Hook
+ # Runs SEQUENTIALLY before committing changes during merge (blocking, fail-fast)
+ # All commands must exit with code 0 for commit to proceed
+ # Runs for both squash and no-squash merge modes
+ # Use for: formatters, linters, quick validation
+ #
+ # Single command:
+ # pre-commit = "cargo fmt -- --check"
+ #
+ # Multiple commands:
+ # [pre-commit]
+ # format = "cargo fmt -- --check"
+ # lint = "cargo clippy -- -D warnings"
+ 
+ # Pre-Merge Hook
+ # Runs SEQUENTIALLY before merging to target branch (blocking, fail-fast)
+ # All commands must exit with code 0 for merge to proceed
+ # Use for: tests, linters, build verification before merging
+ #
+ # Single command:
+ # pre-merge = "cargo test"
+ #
+ # Multiple commands:
+ # [pre-merge]
+ # test = "cargo test"
+ # build = "cargo build --release"
+ 
+ # Post-Merge Hook
+ # Runs SEQUENTIALLY in the main worktree after successful merge (blocking)
+ # Runs after push and cleanup complete
+ # Use for: updating production builds, notifications, cleanup
+ #
+ # Single command:
+ # post-merge = "cargo install --path ."
+ #
+ # Multiple commands:
+ # [post-merge]
+ # install = "cargo install --path ."
+ # notify = "echo 'Merged!'"
+ 
+ # Example: Node.js Project
+ # [post-create]
+ # install = "npm ci"
+ #
+ # [post-start]
+ # server = "npm run dev"
+ #
+ # [pre-merge]
+ # lint = "npm run lint"
+ # test = "npm test"
+ 
+ # Example: Rust Project
+ # [post-create]
+ # build = "cargo build"
+ #
+ # [pre-merge]
+ # format = "cargo fmt -- --check"
+ # clippy = "cargo clippy -- -D warnings"
+ # test = "cargo test"
+ #
+ # post-merge = "cargo install --path ."
+ 
+ # Example: Python Project
+ # [post-create]
+ # venv = "python -m venv .venv"
+ # install = ".venv/bin/pip install -r requirements.txt"
+ #
+ # [pre-merge]
+ # format = ".venv/bin/black --check ."
+ # lint = ".venv/bin/ruff check ."
+ # test = ".venv/bin/pytest"
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_long.snap b/tests/snapshots/integration__integration_tests__help__help_config_long.snap
index a194dcde9..5cb5615bf 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_long.snap
@@ -19,27 +19,27 @@ exit_code: 0
----- stderr -----
wt config - Manage configuration and shell integration
-Usage: wt config [OPTIONS] <COMMAND>
+Usage: wt config [OPTIONS] <COMMAND>
-Commands:
+Commands:
shell Shell integration setup
create Create configuration file
show Show configuration files & locations
cache Manage caches (CI status, default branch)
var Get or set runtime variables (stored in git config)
-Options:
- -h, --help
+Options:
+ -h, --help
Print help (see a summary with '-h')
-Global Options:
- -C <path>
+Global Options:
+ -C <path>
Working directory for this command
- --config <path>
+ --config <path>
User config file path
- -v, --verbose
+ -v, --verbose
Show commands and debug info
Manages configuration, shell integration, and runtime settings.
@@ -51,153 +51,153 @@ Worktrunk uses two configuration files:
User config ~/.config/worktrunk/config.toml Personal settings, command defaults, approved project commands
Project config .config/wt.toml Lifecycle hooks, checked into version control
-Examples
+Examples
Install shell integration (required for directory switching):
- wt config shell install
+ wt config shell install
Create user config file with documented examples:
- wt config create
+ wt config create
Create project config file (.config/wt.toml) for hooks:
- wt config create --project
+ wt config create --project
Show current configuration and file locations:
- wt config show
+ wt config show
-User config
+User config
The user config stores personal preferences that apply across all repositories. Create it with wt config create and view with wt config show.
-Worktree path template
+Worktree path template
Controls where new worktrees are created. The template is relative to the repository root.
-Available variables:
+Available variables:
- {{ main_worktree }} — main worktree directory name
- {{ branch }} — branch name (slashes replaced with dashes)
Examples for a repo at ~/code/myproject creating branch feature/login:
- # Default — siblings in parent directory
- # Creates: ~/code/myproject.feature-login
- worktree-path = "../{{ main_worktree }}.{{ branch }}"
- 
- # Inside the repository
- # Creates: ~/code/myproject/.worktrees/feature-login
- worktree-path = ".worktrees/{{ branch }}"
- 
- # Namespaced (useful when multiple repos share a parent directory)
- # Creates: ~/code/worktrees/myproject/feature-login
- worktree-path = "../worktrees/{{ main_worktree }}/{{ branch }}"
+ # Default — siblings in parent directory
+ # Creates: ~/code/myproject.feature-login
+ worktree-path = "../{{ main_worktree }}.{{ branch }}"
+ 
+ # Inside the repository
+ # Creates: ~/code/myproject/.worktrees/feature-login
+ worktree-path = ".worktrees/{{ branch }}"
+ 
+ # Namespaced (useful when multiple repos share a parent directory)
+ # Creates: ~/code/worktrees/myproject/feature-login
+ worktree-path = "../worktrees/{{ main_worktree }}/{{ branch }}"
-Command settings
+Command settings
Set persistent flag values for commands. These apply unless explicitly overridden on the command line.
-`wt list`:
+`wt list`:
- [list]
- # All off by default
- full = true # --full
- branches = true # --branches
- remotes = true # --remotes
+ [list]
+ # All off by default
+ full = true # --full
+ branches = true # --branches
+ remotes = true # --remotes
-`wt step commit` and `wt merge` staging:
+`wt step commit` and `wt merge` staging:
- [commit]
- stage = "all" # "all" (default), "tracked", or "none"
+ [commit]
+ stage = "all" # "all" (default), "tracked", or "none"
-`wt merge`:
+`wt merge`:
- [merge]
- # These flags are on by default; set to false to disable
- squash = false # Preserve individual commits (--no-squash)
- commit = false # Skip committing uncommitted changes (--no-commit)
- remove = false # Keep worktree after merge (--no-remove)
- verify = false # Skip hooks (--no-verify)
+ [merge]
+ # These flags are on by default; set to false to disable
+ squash = false # Preserve individual commits (--no-squash)
+ commit = false # Skip committing uncommitted changes (--no-commit)
+ remove = false # Keep worktree after merge (--no-remove)
+ verify = false # Skip hooks (--no-verify)
-LLM commit messages
+LLM commit messages
Configure automatic commit message generation. Requires an external tool like llm:
- [commit-generation]
- command = "llm"
- args = ["-m", "claude-haiku-4.5"]
+ [commit-generation]
+ command = "llm"
+ args = ["-m", "claude-haiku-4.5"]
See LLM Commit Messages for setup details and template customization.
-Approved commands
+Approved commands
When project hooks run for the first time, Worktrunk prompts for approval. Approved commands are saved here automatically:
- [projects."my-project"]
- approved-commands = [
-  "post-create.install = npm ci",
-  "pre-merge.test = npm test",
- ]
+ [projects."my-project"]
+ approved-commands = [
+  "post-create.install = npm ci",
+  "pre-merge.test = npm test",
+ ]
Manage approvals with wt hook approvals add to review and pre-approve commands, and wt hook approvals clear to reset (add --global to clear all
projects).
-User hooks
+User hooks
Personal hooks that run for all repositories. Use the same syntax as project hooks:
- [post-create]
- setup = "echo 'Setting up worktree...'"
- 
- [pre-merge]
- notify = "notify-send 'Merging {{ branch }}'"
+ [post-create]
+ setup = "echo 'Setting up worktree...'"
+ 
+ [pre-merge]
+ notify = "notify-send 'Merging {{ branch }}'"
User hooks run before project hooks and don't require approval. Skip with --no-verify.
See wt hook for complete documentation.
-Project config
+Project config
The project config defines lifecycle hooks — commands that run at specific points during worktree operations. This file is checked into version
control and shared across the team.
Create .config/wt.toml in the repository root:
- [post-create]
- install = "npm ci"
- 
- [pre-merge]
- test = "npm test"
- lint = "npm run lint"
+ [post-create]
+ install = "npm ci"
+ 
+ [pre-merge]
+ test = "npm test"
+ lint = "npm run lint"
See wt hook for complete documentation on hook types, execution order, template variables, and JSON context.
-Shell integration
+Shell integration
Worktrunk needs shell integration to change directories when switching worktrees. Install with:
- wt config shell install
+ wt config shell install
Or manually add to the shell config:
- # For bash: add to ~/.bashrc
- eval "$(wt config shell init bash)"
- 
- # For zsh: add to ~/.zshrc
- eval "$(wt config shell init zsh)"
- 
- # For fish: add to ~/.config/fish/config.fish
- wt config shell init fish | source
+ # For bash: add to ~/.bashrc
+ eval "$(wt config shell init bash)"
+ 
+ # For zsh: add to ~/.zshrc
+ eval "$(wt config shell init zsh)"
+ 
+ # For fish: add to ~/.config/fish/config.fish
+ wt config shell init fish | source
Without shell integration, wt switch prints the target directory but cannot cd into it.
-Environment variables
+Environment variables
All user config options can be overridden with environment variables using the WORKTRUNK_ prefix.
-Naming convention
+Naming convention
Config keys use kebab-case (worktree-path), while env vars use SCREAMING_SNAKE_CASE (WORKTRUNK_WORKTREE_PATH). The conversion happens
automatically.
@@ -207,26 +207,26 @@ For nested config sections, use double underscores to separate levels:
Config Environment Variable
───────────────────────── ────────────────────────────────────
worktree-path WORKTRUNK_WORKTREE_PATH
- commit-generation.command WORKTRUNK_COMMIT_GENERATION__COMMAND
+ commit-generation.command WORKTRUNK_COMMIT_GENERATION__COMMAND
commit-generation.args WORKTRUNK_COMMIT_GENERATION__ARGS
Note the single underscore after WORKTRUNK and double underscores between nested keys.
-Array values
+Array values
Array config values like args = ["-m", "claude-haiku"] can be specified as a single string in environment variables:
- export WORKTRUNK_COMMIT_GENERATION__ARGS="-m claude-haiku"
+ export WORKTRUNK_COMMIT_GENERATION__ARGS="-m claude-haiku"
-Example: CI/testing override
+Example: CI/testing override
Override the LLM command in CI to use a mock:
- WORKTRUNK_COMMIT_GENERATION__COMMAND=echo \
- WORKTRUNK_COMMIT_GENERATION__ARGS="test: automated commit" \
-  wt merge
+ WORKTRUNK_COMMIT_GENERATION__COMMAND=echo \
+ WORKTRUNK_COMMIT_GENERATION__ARGS="test: automated commit" \
+  wt merge
-Special variables
+Special variables
Variable Purpose
───────────────────── ─────────────────────────────────────────────────────
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_shell.snap b/tests/snapshots/integration__integration_tests__help__help_config_shell.snap
index e6a34d3b3..5f2efbae4 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_shell.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_shell.snap
@@ -20,18 +20,18 @@ exit_code: 0
----- stderr -----
wt config shell - Shell integration setup
-Usage: wt config shell [OPTIONS] <COMMAND>
+Usage: wt config shell [OPTIONS] <COMMAND>
-Commands:
+Commands:
init Generate shell integration code
install Write shell integration to config files
uninstall Remove shell integration from config files
show-theme Show output theme samples
-Options:
+Options:
-h, --help Print help
-Global Options:
+Global Options:
-C <path> Working directory for this command
--config <path> User config file path
-v, --verbose Show commands and debug info
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_short.snap b/tests/snapshots/integration__integration_tests__help__help_config_short.snap
index c156fc9a4..929be7ed3 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_short.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_short.snap
@@ -19,19 +19,19 @@ exit_code: 0
----- stderr -----
wt config - Manage configuration and shell integration
-Usage: wt config [OPTIONS] <COMMAND>
+Usage: wt config [OPTIONS] <COMMAND>
-Commands:
+Commands:
shell Shell integration setup
create Create configuration file
show Show configuration files & locations
cache Manage caches (CI status, default branch)
var Get or set runtime variables (stored in git config)
-Options:
+Options:
-h, --help Print help (see more with '--help')
-Global Options:
+Global Options:
-C <path> Working directory for this command
--config <path> User config file path
-v, --verbose Show commands and debug info
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_show.snap b/tests/snapshots/integration__integration_tests__help__help_config_show.snap
index a0b86ad0d..45190e004 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_show.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_show.snap
@@ -20,23 +20,23 @@ exit_code: 0
----- stderr -----
wt config show - Show configuration files & locations
-Usage: wt config show [OPTIONS]
+Usage: wt config show [OPTIONS]
-Options:
- --doctor
+Options:
+ --doctor
Test commit generation pipeline
- -h, --help
+ -h, --help
Print help (see a summary with '-h')
-Global Options:
- -C <path>
+Global Options:
+ -C <path>
Working directory for this command
- --config <path>
+ --config <path>
User config file path
- -v, --verbose
+ -v, --verbose
Show commands and debug info
Shows location and contents of user config (~/.config/worktrunk/config.toml)
@@ -44,11 +44,11 @@ and project config (.config/wt.toml).
If a config file doesn't exist, shows defaults that would be used.
-Doctor mode
+Doctor mode
Use --doctor to test commit generation with a synthetic diff:
- wt config show --doctor
+ wt config show --doctor
This verifies that the LLM command is configured correctly and can generate
commit messages.
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_var.snap b/tests/snapshots/integration__integration_tests__help__help_config_var.snap
index aeab0534b..3ee91fbc4 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_var.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_var.snap
@@ -20,42 +20,42 @@ exit_code: 0
----- stderr -----
wt config var - Get or set runtime variables (stored in git config)
-Usage: wt config var [OPTIONS] <COMMAND>
+Usage: wt config var [OPTIONS] <COMMAND>
-Commands:
+Commands:
get Get a variable value
set Set a variable value
clear Clear a variable value
-Options:
- -h, --help
+Options:
+ -h, --help
Print help (see a summary with '-h')
-Global Options:
- -C <path>
+Global Options:
+ -C <path>
Working directory for this command
- --config <path>
+ --config <path>
User config file path
- -v, --verbose
+ -v, --verbose
Show commands and debug info
Variables are runtime values stored in git config, separate from
configuration files. Use wt config show to view file-based configuration.
-Available variables
+Available variables
- default-branch: The repository's default branch (read-only, cached)
- marker: Custom status marker for a branch (shown in wt list)
-Examples
+Examples
Get the default branch:
- wt config var get default-branch
+ wt config var get default-branch
Set a marker for current branch:
- wt config var set marker "🚧 WIP"
+ wt config var set marker "🚧 WIP"
Clear markers:
- wt config var clear marker --all
+ wt config var clear marker --all
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_var_clear.snap b/tests/snapshots/integration__integration_tests__help__help_config_var_clear.snap
index 3d7409a52..31dac3173 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_var_clear.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_var_clear.snap
@@ -21,45 +21,45 @@ exit_code: 0
----- stderr -----
wt config var clear - Clear a variable value
-Usage: wt config var clear [OPTIONS] <KEY>
+Usage: wt config var clear [OPTIONS] <KEY>
-Arguments:
- <KEY>
+Arguments:
+ <KEY>
Variable: 'marker'
[possible values: marker]
-Options:
- --branch <BRANCH>
+Options:
+ --branch <BRANCH>
Target branch (defaults to current)
- --all
+ --all
Clear all values
- -h, --help
+ -h, --help
Print help (see a summary with '-h')
-Global Options:
- -C <path>
+Global Options:
+ -C <path>
Working directory for this command
- --config <path>
+ --config <path>
User config file path
- -v, --verbose
+ -v, --verbose
Show commands and debug info
Variables:
- marker: Custom status marker for a branch
-Examples
+Examples
Clear marker for current branch:
- wt config var clear marker
+ wt config var clear marker
Clear marker for a specific branch:
- wt config var clear marker --branch=feature
+ wt config var clear marker --branch=feature
Clear all markers:
- wt config var clear marker --all
+ wt config var clear marker --all
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_var_get.snap b/tests/snapshots/integration__integration_tests__help__help_config_var_get.snap
index 43aaf3c10..d48b126e4 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_var_get.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_var_get.snap
@@ -21,32 +21,32 @@ exit_code: 0
----- stderr -----
wt config var get - Get a variable value
-Usage: wt config var get [OPTIONS] <KEY>
+Usage: wt config var get [OPTIONS] <KEY>
-Arguments:
- <KEY>
+Arguments:
+ <KEY>
Variable: 'default-branch', 'marker', or 'ci-status'
[possible values: default-branch, marker, ci-status]
-Options:
- --refresh
+Options:
+ --refresh
Force refresh (for cached variables)
- --branch <BRANCH>
+ --branch <BRANCH>
Target branch (for branch-scoped variables)
- -h, --help
+ -h, --help
Print help (see a summary with '-h')
-Global Options:
- -C <path>
+Global Options:
+ -C <path>
Working directory for this command
- --config <path>
+ --config <path>
User config file path
- -v, --verbose
+ -v, --verbose
Show commands and debug info
Variables:
@@ -55,22 +55,22 @@ Variables:
- marker: Custom status marker for a branch (shown in wt list)
- ci-status: CI/PR status for a branch (passed, running, failed, conflicts, noci)
-Examples
+Examples
Get the default branch:
- wt config var get default-branch
+ wt config var get default-branch
Force refresh from remote:
- wt config var get default-branch --refresh
+ wt config var get default-branch --refresh
Get marker for current branch:
- wt config var get marker
+ wt config var get marker
Get marker for a specific branch:
- wt config var get marker --branch=feature
+ wt config var get marker --branch=feature
Get CI status for current branch:
- wt config var get ci-status
+ wt config var get ci-status
Force refresh CI status (bypass cache):
- wt config var get ci-status --refresh
+ wt config var get ci-status --refresh
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_var_set.snap b/tests/snapshots/integration__integration_tests__help__help_config_var_set.snap
index 766e35260..784a70063 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_var_set.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_var_set.snap
@@ -21,42 +21,42 @@ exit_code: 0
----- stderr -----
wt config var set - Set a variable value
-Usage: wt config var set [OPTIONS] <KEY> <VALUE>
+Usage: wt config var set [OPTIONS] <KEY> <VALUE>
-Arguments:
- <KEY>
+Arguments:
+ <KEY>
Variable: 'marker'
[possible values: marker]
- <VALUE>
+ <VALUE>
Value to set
-Options:
- --branch <BRANCH>
+Options:
+ --branch <BRANCH>
Target branch (defaults to current)
- -h, --help
+ -h, --help
Print help (see a summary with '-h')
-Global Options:
- -C <path>
+Global Options:
+ -C <path>
Working directory for this command
- --config <path>
+ --config <path>
User config file path
- -v, --verbose
+ -v, --verbose
Show commands and debug info
Variables:
- marker: Custom status marker displayed in wt list output
-Examples
+Examples
Set marker for current branch:
- wt config var set marker "🚧 WIP"
+ wt config var set marker "🚧 WIP"
Set marker for a specific branch:
- wt config var set marker "✅ ready" --branch=feature
+ wt config var set marker "✅ ready" --branch=feature
diff --git a/tests/snapshots/integration__integration_tests__help__help_hook_approvals.snap b/tests/snapshots/integration__integration_tests__help__help_hook_approvals.snap
index 84624165c..8aa33482d 100644
--- a/tests/snapshots/integration__integration_tests__help__help_hook_approvals.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_hook_approvals.snap
@@ -20,52 +20,52 @@ exit_code: 0
----- stderr -----
wt hook approvals - Manage command approvals
-Usage: wt hook approvals [OPTIONS] <COMMAND>
+Usage: wt hook approvals [OPTIONS] <COMMAND>
-Commands:
+Commands:
add Store approvals in config
clear Clear approved commands from config
-Options:
- -h, --help
+Options:
+ -h, --help
Print help (see a summary with '-h')
-Global Options:
- -C <path>
+Global Options:
+ -C <path>
Working directory for this command
- --config <path>
+ --config <path>
User config file path
- -v, --verbose
+ -v, --verbose
Show commands and debug info
-How Approvals Work
+How Approvals Work
Commands from project hooks (.config/wt.toml) and LLM configuration require
approval on first run. This prevents untrusted projects from running arbitrary
commands.
-Approval flow:
+Approval flow:
1. Command is shown with expanded template variables
2. User approves or denies
-3. Approved commands are saved to user config under [projects."project-id"]
+3. Approved commands are saved to user config under [projects."project-id"]
-When re-approval is required:
+When re-approval is required:
- Command template changes (not just variable values)
- Project ID changes (repository moves)
-Bypassing prompts:
+Bypassing prompts:
- --force flag on individual commands (e.g., wt merge --force)
- Useful for CI/automation where prompts aren't possible
-Examples
+Examples
Pre-approve all commands for current project:
- wt hook approvals add
+ wt hook approvals add
Clear approvals for current project:
- wt hook approvals clear
+ wt hook approvals clear
Clear global approvals:
- wt hook approvals clear --global
+ wt hook approvals clear --global
diff --git a/tests/snapshots/integration__integration_tests__help__help_hook_approvals_add.snap b/tests/snapshots/integration__integration_tests__help__help_hook_approvals_add.snap
index 5f83ce4e9..fac5affeb 100644
--- a/tests/snapshots/integration__integration_tests__help__help_hook_approvals_add.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_hook_approvals_add.snap
@@ -21,23 +21,23 @@ exit_code: 0
----- stderr -----
wt hook approvals add - Store approvals in config
-Usage: wt hook approvals add [OPTIONS]
+Usage: wt hook approvals add [OPTIONS]
-Options:
- --all
+Options:
+ --all
Show all commands
- -h, --help
+ -h, --help
Print help (see a summary with '-h')
-Global Options:
- -C <path>
+Global Options:
+ -C <path>
Working directory for this command
- --config <path>
+ --config <path>
User config file path
- -v, --verbose
+ -v, --verbose
Show commands and debug info
Prompts for approval of all project commands and saves them to user config.
diff --git a/tests/snapshots/integration__integration_tests__help__help_hook_approvals_clear.snap b/tests/snapshots/integration__integration_tests__help__help_hook_approvals_clear.snap
index 9733668db..0e9e25e95 100644
--- a/tests/snapshots/integration__integration_tests__help__help_hook_approvals_clear.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_hook_approvals_clear.snap
@@ -21,23 +21,23 @@ exit_code: 0
----- stderr -----
wt hook approvals clear - Clear approved commands from config
-Usage: wt hook approvals clear [OPTIONS]
+Usage: wt hook approvals clear [OPTIONS]
-Options:
- -g, --global
+Options:
+ -g, --global
Clear global approvals
- -h, --help
+ -h, --help
Print help (see a summary with '-h')
-Global Options:
- -C <path>
+Global Options:
+ -C <path>
Working directory for this command
- --config <path>
+ --config <path>
User config file path
- -v, --verbose
+ -v, --verbose
Show commands and debug info
Removes saved approvals, requiring re-approval on next command run.
diff --git a/tests/snapshots/integration__integration_tests__help__help_list_long.snap b/tests/snapshots/integration__integration_tests__help__help_list_long.snap
index c1a0ff96f..6603fafc3 100644
--- a/tests/snapshots/integration__integration_tests__help__help_list_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_list_long.snap
@@ -19,43 +19,43 @@ exit_code: 0
----- stderr -----
wt list - List worktrees and optionally branches
-Usage: wt list [OPTIONS]
- wt list <COMMAND>
+Usage: wt list [OPTIONS]
+ wt list <COMMAND>
-Commands:
+Commands:
statusline Single-line status for shell prompts
-Options:
- --format <FORMAT>
+Options:
+ --format <FORMAT>
Output format (table, json)
[default: table]
- --branches
+ --branches
Include branches without worktrees
- --remotes
+ --remotes
Include remote branches
- --full
+ --full
Show CI and main diffstat
- --progressive
- Show fast info immediately, update with slow info
- 
- Displays local data (branches, paths, status) first, then updates with remote data (CI, upstream) as it arrives. Auto-enabled for TTY.
+ --progressive
+ Show fast info immediately, update with slow info
+
+ Displays local data (branches, paths, status) first, then updates with remote data (CI, upstream) as it arrives. Auto-enabled for TTY.
- -h, --help
+ -h, --help
Print help (see a summary with '-h')
-Global Options:
- -C <path>
+Global Options:
+ -C <path>
Working directory for this command
- --config <path>
+ --config <path>
User config file path
- -v, --verbose
+ -v, --verbose
Show commands and debug info
Show all worktrees with their status. The table includes uncommitted changes, divergence from main and remote, and optional CI status.
@@ -64,25 +64,25 @@ The table renders progressively: branch names, paths, and commit hashes appear i
background git operations complete. With --full, CI status fetches from the network — the table displays instantly and CI fills in as results
arrive.
-Examples
+Examples
List all worktrees:
- $ wt list
+ $ wt list
Include CI status and line diffs:
- $ wt list --full
+ $ wt list --full
Include branches that don't have worktrees:
- $ wt list --branches --full
+ $ wt list --branches --full
Output as JSON for scripting:
- $ wt list --format=json
+ $ wt list --format=json
-Columns
+Columns
Column Shows
─────── ────────────────────────────────────────────
@@ -98,7 +98,7 @@ Output as JSON for scripting:
Age Time since last commit
Message Last commit message (truncated)
-CI status
+CI status
The CI column shows GitHub/GitLab pipeline status:
@@ -114,7 +114,7 @@ The CI column shows GitHub/GitLab pipeline status:
CI is only checked for branches that track a remote — local-only branches show blank. Any CI dot appears dimmed when there are unpushed local changes
(stale status). CI indicators are clickable links to the PR page. Results are cached for 30-60 seconds; use wt config cache to view or clear.
-Status symbols
+Status symbols
The Status column has multiple subcolumns. Within each, only the first matching symbol is shown (listed in priority order):
@@ -144,26 +144,26 @@ The Status column has multiple subcolumns. Within each, only the first matching
Rows are dimmed when the branch content is already in main (_ same commit or ⊂ content integrated).
-JSON output
+JSON output
Query structured data with --format=json:
- # Worktrees with merge conflicts
- wt list --format=json | jq '.[] | select(.operation_state == "conflicts")'
- 
- # Uncommitted changes
- wt list --format=json | jq '.[] | select(.working_tree.modified)'
- 
- # Current worktree
- wt list --format=json | jq '.[] | select(.is_current)'
- 
- # Branches ahead of main
- wt list --format=json | jq '.[] | select(.main.ahead > 0)'
- 
- # Integrated branches (ready to clean up)
- wt list --format=json | jq '.[] | select(.main_state == "integrated" or .main_state == "same_commit")'
-
-Fields:
+ # Worktrees with merge conflicts
+ wt list --format=json | jq '.[] | select(.operation_state == "conflicts")'
+ 
+ # Uncommitted changes
+ wt list --format=json | jq '.[] | select(.working_tree.modified)'
+ 
+ # Current worktree
+ wt list --format=json | jq '.[] | select(.is_current)'
+ 
+ # Branches ahead of main
+ wt list --format=json | jq '.[] | select(.main.ahead > 0)'
+ 
+ # Integrated branches (ready to clean up)
+ wt list --format=json | jq '.[] | select(.main_state == "integrated" or .main_state == "same_commit")'
+
+Fields:
Field Description
────────────────── ──────────────────────────────────────────────────────────────────────────────────────────────────
@@ -185,6 +185,6 @@ Query structured data with --format=json:
statusline Pre-formatted status with ANSI colors
symbols Raw status symbols without colors (e.g., "!?↓")
-See also
+See also
- wt select — Interactive worktree picker with live preview
diff --git a/tests/snapshots/integration__integration_tests__help__help_list_short.snap b/tests/snapshots/integration__integration_tests__help__help_list_short.snap
index 786149544..6b542041e 100644
--- a/tests/snapshots/integration__integration_tests__help__help_list_short.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_list_short.snap
@@ -19,13 +19,13 @@ exit_code: 0
----- stderr -----
wt list - List worktrees and optionally branches
-Usage: wt list [OPTIONS]
- wt list <COMMAND>
+Usage: wt list [OPTIONS]
+ wt list <COMMAND>
-Commands:
+Commands:
statusline Single-line status for shell prompts
-Options:
+Options:
--format <FORMAT> Output format (table, json) [default: table]
--branches Include branches without worktrees
--remotes Include remote branches
@@ -33,7 +33,7 @@ Usage: wt list [OPTIONS]
--progressive Show fast info immediately, update with slow info
-h, --help Print help (see more with '--help')
-Global Options:
+Global Options:
-C <path> Working directory for this command
--config <path> User config file path
-v, --verbose Show commands and debug info
diff --git a/tests/snapshots/integration__integration_tests__help__help_merge_long.snap b/tests/snapshots/integration__integration_tests__help__help_merge_long.snap
index 479c131e3..4b2969171 100644
--- a/tests/snapshots/integration__integration_tests__help__help_merge_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_merge_long.snap
@@ -19,31 +19,31 @@ exit_code: 0
----- stderr -----
wt merge - Merge worktree into target branch
-Usage: wt merge [OPTIONS] [TARGET]
+Usage: wt merge [OPTIONS] [TARGET]
-Arguments:
- [TARGET]
- Target branch
- 
- Defaults to default branch.
+Arguments:
+ [TARGET]
+ Target branch
+
+ Defaults to default branch.
-Options:
- --no-squash
+Options:
+ --no-squash
Skip commit squashing
- --no-commit
+ --no-commit
Skip commit, squash, and rebase
- --no-remove
+ --no-remove
Keep worktree after merge
- --no-verify
+ --no-verify
Skip hooks
- -f, --force
+ -f, --force
Skip approval prompts
- --stage <STAGE>
+ --stage <STAGE>
What to stage before committing [default: all]
Possible values:
@@ -51,17 +51,17 @@ Usage: wt merge [OPTIONS] [TARGET]
- tracked: Stage tracked changes only (like git add -u)
- none: Stage nothing, commit only what's already in the index
- -h, --help
+ -h, --help
Print help (see a summary with '-h')
-Global Options:
- -C <path>
+Global Options:
+ -C <path>
Working directory for this command
- --config <path>
+ --config <path>
User config file path
- -v, --verbose
+ -v, --verbose
Show commands and debug info
Merge the current branch into the target branch and clean up. Handles the full workflow: commit uncommitted changes, squash commits, rebase, run
@@ -69,29 +69,29 @@ hooks, push to target, and remove the worktree.
When already on the target branch or in the main worktree, the worktree is preserved automatically.
-Examples
+Examples
Basic merge to main:
- wt merge
+ wt merge
Merge to a different branch:
- wt merge develop
+ wt merge develop
Keep the worktree after merging:
- wt merge --no-remove
+ wt merge --no-remove
Preserve commit history (no squash):
- wt merge --no-squash
+ wt merge --no-squash
Skip git operations, only run hooks and push:
- wt merge --no-commit
+ wt merge --no-commit
-Pipeline
+Pipeline
wt merge runs these steps:
@@ -108,7 +108,7 @@ changes are committed separately and individual commits are preserved.
Use --no-commit to skip all git operations (steps 1-2) and only run hooks and merge. Useful after preparing commits manually with wt step.
Requires a clean working tree.
-See also
+See also
- wt step — Run individual merge steps (commit, squash, rebase, push)
- wt remove — Remove worktrees without merging
diff --git a/tests/snapshots/integration__integration_tests__help__help_merge_short.snap b/tests/snapshots/integration__integration_tests__help__help_merge_short.snap
index be42e29d7..59eb15c99 100644
--- a/tests/snapshots/integration__integration_tests__help__help_merge_short.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_merge_short.snap
@@ -19,12 +19,12 @@ exit_code: 0
----- stderr -----
wt merge - Merge worktree into target branch
-Usage: wt merge [OPTIONS] [TARGET]
+Usage: wt merge [OPTIONS] [TARGET]
-Arguments:
+Arguments:
[TARGET] Target branch
-Options:
+Options:
--no-squash Skip commit squashing
--no-commit Skip commit, squash, and rebase
--no-remove Keep worktree after merge
@@ -33,7 +33,7 @@ Usage: wt merge [OPTIONS] [TARGET]
--stage <STAGE> What to stage before committing [default: all] [possible values: all, tracked, none]
-h, --help Print help (see more with '--help')
-Global Options:
+Global Options:
-C <path> Working directory for this command
--config <path> User config file path
-v, --verbose Show commands and debug info
diff --git a/tests/snapshots/integration__integration_tests__help__help_no_args.snap b/tests/snapshots/integration__integration_tests__help__help_no_args.snap
index 4cf8c3379..48f5491bd 100644
--- a/tests/snapshots/integration__integration_tests__help__help_no_args.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_no_args.snap
@@ -17,9 +17,9 @@ exit_code: 0
----- stderr -----
wt - Git worktree management
-Usage: wt [OPTIONS] [COMMAND]
+Usage: wt [OPTIONS] [COMMAND]
-Commands:
+Commands:
config Manage configuration and shell integration
step Run individual workflow operations
hook Run hooks independently
@@ -29,11 +29,11 @@ Usage: wt [OPTIONS] [COMMAND]
remove Remove worktree and branch
merge Merge worktree into target branch
-Options:
+Options:
-h, --help Print help (see more with '--help')
-V, --version Print version
-Global Options:
+Global Options:
-C <path> Working directory for this command
--config <path> User config file path
-v, --verbose Show commands and debug info
diff --git a/tests/snapshots/integration__integration_tests__help__help_remove_long.snap b/tests/snapshots/integration__integration_tests__help__help_remove_long.snap
index aa5104f0c..2ccdcb210 100644
--- a/tests/snapshots/integration__integration_tests__help__help_remove_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_remove_long.snap
@@ -19,63 +19,63 @@ exit_code: 0
----- stderr -----
wt remove - Remove worktree and branch
-Usage: wt remove [OPTIONS] [WORKTREES]...
+Usage: wt remove [OPTIONS] [WORKTREES]...
-Arguments:
- [WORKTREES]...
+Arguments:
+ [WORKTREES]...
Worktree or branch (@ for current)
-Options:
- --no-delete-branch
+Options:
+ --no-delete-branch
Keep branch after removal
- -D, --force-delete
+ -D, --force-delete
Delete unmerged branches
- --no-background
+ --no-background
Run removal in foreground
- --no-verify
+ --no-verify
Skip hooks
- --force
+ --force
Skip approval prompts
- -h, --help
+ -h, --help
Print help (see a summary with '-h')
-Global Options:
- -C <path>
+Global Options:
+ -C <path>
Working directory for this command
- --config <path>
+ --config <path>
User config file path
- -v, --verbose
+ -v, --verbose
Show commands and debug info
Removes worktrees and their branches. Without arguments, removes the current worktree and returns to the main worktree.
-Examples
+Examples
Remove current worktree:
- wt remove
+ wt remove
Remove specific worktrees:
- wt remove feature-branch
- wt remove old-feature another-branch
+ wt remove feature-branch
+ wt remove old-feature another-branch
Keep the branch:
- wt remove --no-delete-branch feature-branch
+ wt remove --no-delete-branch feature-branch
Force-delete an unmerged branch:
- wt remove -D experimental
+ wt remove -D experimental
-Branch cleanup
+Branch cleanup
Branches delete automatically when their content is already in the target branch (typically main). This works with squash-merge and rebase workflows
where commit history differs but file changes match.
@@ -94,14 +94,14 @@ In wt list, _ indicates same commit, and ⊂ indicates c
Use -D to force-delete branches with unmerged changes. Use --no-delete-branch to keep the branch regardless of status.
-Background removal
+Background removal
Removal runs in the background by default (returns immediately). Logs are written to .git/wt-logs/{branch}-remove.log. Use --no-background to run
in the foreground.
Arguments resolve by path first, then branch name. Shortcuts: @ (current), - (previous), ^ (main worktree).
-See also
+See also
- wt merge — Remove worktree after merging
- wt list — View all worktrees
diff --git a/tests/snapshots/integration__integration_tests__help__help_remove_short.snap b/tests/snapshots/integration__integration_tests__help__help_remove_short.snap
index b4412dbe7..c1ea2c032 100644
--- a/tests/snapshots/integration__integration_tests__help__help_remove_short.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_remove_short.snap
@@ -19,12 +19,12 @@ exit_code: 0
----- stderr -----
wt remove - Remove worktree and branch
-Usage: wt remove [OPTIONS] [WORKTREES]...
+Usage: wt remove [OPTIONS] [WORKTREES]...
-Arguments:
+Arguments:
[WORKTREES]... Worktree or branch (@ for current)
-Options:
+Options:
--no-delete-branch Keep branch after removal
-D, --force-delete Delete unmerged branches
--no-background Run removal in foreground
@@ -32,7 +32,7 @@ Usage: wt remove [OPTIONS] [WORKTREES]...
--force Skip approval prompts
-h, --help Print help (see more with '--help')
-Global Options:
+Global Options:
-C <path> Working directory for this command
--config <path> User config file path
-v, --verbose Show commands and debug info
diff --git a/tests/snapshots/integration__integration_tests__help__help_root_long.snap b/tests/snapshots/integration__integration_tests__help__help_root_long.snap
index 35e1fe314..6c5ad2e25 100644
--- a/tests/snapshots/integration__integration_tests__help__help_root_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_root_long.snap
@@ -18,9 +18,9 @@ exit_code: 0
----- stderr -----
wt - Git worktree management
-Usage: wt [OPTIONS] [COMMAND]
+Usage: wt [OPTIONS] [COMMAND]
-Commands:
+Commands:
config Manage configuration and shell integration
step Run individual workflow operations
hook Run hooks independently
@@ -30,21 +30,21 @@ Usage: wt [OPTIONS] [COMMAND]
remove Remove worktree and branch
merge Merge worktree into target branch
-Options:
- -h, --help
+Options:
+ -h, --help
Print help (see a summary with '-h')
- -V, --version
+ -V, --version
Print version
-Global Options:
- -C <path>
+Global Options:
+ -C <path>
Working directory for this command
- --config <path>
+ --config <path>
User config file path
- -v, --verbose
+ -v, --verbose
Show commands and debug info
Getting started
diff --git a/tests/snapshots/integration__integration_tests__help__help_root_short.snap b/tests/snapshots/integration__integration_tests__help__help_root_short.snap
index 889f4774b..6728dff01 100644
--- a/tests/snapshots/integration__integration_tests__help__help_root_short.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_root_short.snap
@@ -18,9 +18,9 @@ exit_code: 0
----- stderr -----
wt - Git worktree management
-Usage: wt [OPTIONS] [COMMAND]
+Usage: wt [OPTIONS] [COMMAND]
-Commands:
+Commands:
config Manage configuration and shell integration
step Run individual workflow operations
hook Run hooks independently
@@ -30,11 +30,11 @@ Usage: wt [OPTIONS] [COMMAND]
remove Remove worktree and branch
merge Merge worktree into target branch
-Options:
+Options:
-h, --help Print help (see more with '--help')
-V, --version Print version
-Global Options:
+Global Options:
-C <path> Working directory for this command
--config <path> User config file path
-v, --verbose Show commands and debug info
diff --git a/tests/snapshots/integration__integration_tests__help__help_step_long.snap b/tests/snapshots/integration__integration_tests__help__help_step_long.snap
index 516a617b5..bbc49c919 100644
--- a/tests/snapshots/integration__integration_tests__help__help_step_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_step_long.snap
@@ -19,52 +19,52 @@ exit_code: 0
----- stderr -----
wt step - Run individual workflow operations
-Usage: wt step [OPTIONS] <COMMAND>
+Usage: wt step [OPTIONS] <COMMAND>
-Commands:
+Commands:
commit Commit changes with LLM commit message
squash Squash commits down to target
push Push changes to local target branch
rebase Rebase onto target
-Options:
- -h, --help
+Options:
+ -h, --help
Print help (see a summary with '-h')
-Global Options:
- -C <path>
+Global Options:
+ -C <path>
Working directory for this command
- --config <path>
+ --config <path>
User config file path
- -v, --verbose
+ -v, --verbose
Show commands and debug info
Run individual git workflow operations: commits, squashes, rebases, and pushes.
-Examples
+Examples
Commit with LLM-generated message:
- wt step commit
+ wt step commit
Manual merge workflow with review between steps:
- wt step commit
- wt step squash
- # Review the squashed commit
- wt step rebase
- wt step push
+ wt step commit
+ wt step squash
+ # Review the squashed commit
+ wt step rebase
+ wt step push
-Operations
+Operations
- commit — Stage and commit with LLM-generated message
- squash — Squash all branch commits into one with LLM-generated message
- rebase — Rebase onto target branch
- push — Push to target branch (default: main)
-See also
+See also
- wt merge — Runs commit → squash → rebase → hooks → push → cleanup automatically
- wt hook — Run hooks independently
diff --git a/tests/snapshots/integration__integration_tests__help__help_step_short.snap b/tests/snapshots/integration__integration_tests__help__help_step_short.snap
index 24cedb713..316f1df41 100644
--- a/tests/snapshots/integration__integration_tests__help__help_step_short.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_step_short.snap
@@ -19,18 +19,18 @@ exit_code: 0
----- stderr -----
wt step - Run individual workflow operations
-Usage: wt step [OPTIONS] <COMMAND>
+Usage: wt step [OPTIONS] <COMMAND>
-Commands:
+Commands:
commit Commit changes with LLM commit message
squash Squash commits down to target
push Push changes to local target branch
rebase Rebase onto target
-Options:
+Options:
-h, --help Print help (see more with '--help')
-Global Options:
+Global Options:
-C <path> Working directory for this command
--config <path> User config file path
-v, --verbose Show commands and debug info
diff --git a/tests/snapshots/integration__integration_tests__help__help_switch_long.snap b/tests/snapshots/integration__integration_tests__help__help_switch_long.snap
index 1136c6284..fda407314 100644
--- a/tests/snapshots/integration__integration_tests__help__help_switch_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_switch_long.snap
@@ -19,52 +19,52 @@ exit_code: 0
----- stderr -----
wt switch - Switch to a worktree
-Usage: wt switch [OPTIONS] <BRANCH>
+Usage: wt switch [OPTIONS] <BRANCH>
-Arguments:
- <BRANCH>
- Branch or worktree name
- 
- Shortcuts: '^' (main), '-' (previous), '@' (current)
+Arguments:
+ <BRANCH>
+ Branch or worktree name
+
+ Shortcuts: '^' (main), '-' (previous), '@' (current)
-Options:
- -c, --create
+Options:
+ -c, --create
Create a new branch
- -b, --base <BASE>
- Base branch
- 
- Defaults to default branch.
+ -b, --base <BASE>
+ Base branch
+
+ Defaults to default branch.
- -x, --execute <EXECUTE>
- Command to run after switch
- 
+ -x, --execute <EXECUTE>
+ Command to run after switch
+
Replaces the wt process with the command after switching, giving it full terminal control. Useful for launching editors, AI agents, or other
- interactive tools.
- 
- Especially useful in shell aliases to create a worktree and start working in one command:
+ interactive tools.
+
+ Especially useful in shell aliases to create a worktree and start working in one command:
+
+ alias wsc='wt switch --create --execute=claude'

- alias wsc='wt switch --create --execute=claude'
- 
- Then wsc feature-branch creates the worktree and launches Claude Code.
+ Then wsc feature-branch creates the worktree and launches Claude Code.
- -f, --force
+ -f, --force
Skip approval prompts
- --no-verify
+ --no-verify
Skip hooks
- -h, --help
+ -h, --help
Print help (see a summary with '-h')
-Global Options:
- -C <path>
+Global Options:
+ -C <path>
Working directory for this command
- --config <path>
+ --config <path>
User config file path
- -v, --verbose
+ -v, --verbose
Show commands and debug info
Two distinct operations:
@@ -72,16 +72,16 @@ Two distinct operations:
- Switch to existing worktree — Changes directory, nothing else
- Create new worktree (--create) — Creates branch and worktree, runs hooks
-Examples
+Examples
- wt switch feature-auth # Switch to existing worktree
- wt switch - # Previous worktree (like cd -)
- wt switch --create new-feature # Create branch and worktree
- wt switch --create hotfix --base production
+ wt switch feature-auth # Switch to existing worktree
+ wt switch - # Previous worktree (like cd -)
+ wt switch --create new-feature # Create branch and worktree
+ wt switch --create hotfix --base production
For interactive selection, use `wt select`.
-Creating worktrees
+Creating worktrees
With --create, worktrunk:
@@ -91,12 +91,12 @@ With --create, worktrunk:
4. Switches to new directory
5. Spawns post-start hooks (background)
- wt switch --create api-refactor
- wt switch --create fix --base release-2.0
- wt switch --create docs --execute "code ."
- wt switch --create temp --no-verify # Skip hooks
+ wt switch --create api-refactor
+ wt switch --create fix --base release-2.0
+ wt switch --create docs --execute "code ."
+ wt switch --create temp --no-verify # Skip hooks
-Shortcuts
+Shortcuts
Shortcut Meaning
──────── ─────────────────────────────
@@ -104,11 +104,11 @@ With --create, worktrunk:
@ Current branch/worktree
- Previous worktree (like cd -)
- wt switch - # Back to previous
- wt switch ^ # Main worktree
- wt switch --create fix --base=@ # Branch from current HEAD
+ wt switch - # Back to previous
+ wt switch ^ # Main worktree
+ wt switch --create fix --base=@ # Branch from current HEAD
-See also
+See also
- wt select — Interactive worktree selection
- wt list — View all worktrees
diff --git a/tests/snapshots/integration__integration_tests__help__help_switch_short.snap b/tests/snapshots/integration__integration_tests__help__help_switch_short.snap
index 429af0bc8..e44e39903 100644
--- a/tests/snapshots/integration__integration_tests__help__help_switch_short.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_switch_short.snap
@@ -19,12 +19,12 @@ exit_code: 0
----- stderr -----
wt switch - Switch to a worktree
-Usage: wt switch [OPTIONS] <BRANCH>
+Usage: wt switch [OPTIONS] <BRANCH>
-Arguments:
+Arguments:
<BRANCH> Branch or worktree name
-Options:
+Options:
-c, --create Create a new branch
-b, --base <BASE> Base branch
-x, --execute <EXECUTE> Command to run after switch
@@ -32,7 +32,7 @@ Usage: wt switch [OPTIONS] <BRANCH>
--no-verify Skip hooks
-h, --help Print help (see more with '--help')
-Global Options:
+Global Options:
-C <path> Working directory for this command
--config <path> User config file path
-v, --verbose Show commands and debug info
diff --git a/tests/snapshots/integration__integration_tests__hook_show__hook_show_approval_status.snap b/tests/snapshots/integration__integration_tests__hook_show__hook_show_approval_status.snap
index 75c4373e0..523719deb 100644
--- a/tests/snapshots/integration__integration_tests__hook_show__hook_show_approval_status.snap
+++ b/tests/snapshots/integration__integration_tests__hook_show__hook_show_approval_status.snap
@@ -17,6 +17,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
@@ -30,6 +31,6 @@ exit_code: 0
PROJECT HOOKS [REPO]/.config/wt.toml
⚪ pre-merge build:
-  cargo build
+  cargo build
❓ pre-merge test: (requires approval)
-  cargo test
+  cargo test
diff --git a/tests/snapshots/integration__integration_tests__hook_show__hook_show_filter_by_type.snap b/tests/snapshots/integration__integration_tests__hook_show__hook_show_filter_by_type.snap
index ca78a3726..f472364cf 100644
--- a/tests/snapshots/integration__integration_tests__hook_show__hook_show_filter_by_type.snap
+++ b/tests/snapshots/integration__integration_tests__hook_show__hook_show_filter_by_type.snap
@@ -18,6 +18,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
@@ -31,6 +32,6 @@ exit_code: 0
PROJECT HOOKS [REPO]/.config/wt.toml
❓ pre-merge build: (requires approval)
-  cargo build
+  cargo build
❓ pre-merge test: (requires approval)
-  cargo test
+  cargo test
diff --git a/tests/snapshots/integration__integration_tests__hook_show__hook_show_with_both_configs.snap b/tests/snapshots/integration__integration_tests__hook_show__hook_show_with_both_configs.snap
index 103f36f65..39755933c 100644
--- a/tests/snapshots/integration__integration_tests__hook_show__hook_show_with_both_configs.snap
+++ b/tests/snapshots/integration__integration_tests__hook_show__hook_show_with_both_configs.snap
@@ -17,6 +17,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
@@ -30,8 +31,8 @@ exit_code: 0
PROJECT HOOKS [REPO]/.config/wt.toml
❓ post-start deps: (requires approval)
-  npm install
+  npm install
❓ pre-merge build: (requires approval)
-  cargo build
+  cargo build
❓ pre-merge test: (requires approval)
-  cargo test
+  cargo test
diff --git a/tests/snapshots/integration__integration_tests__internal_flag__config_show_with_internal_flag.snap b/tests/snapshots/integration__integration_tests__internal_flag__config_show_with_internal_flag.snap
index 15fb4daa2..9d671fb5a 100644
--- a/tests/snapshots/integration__integration_tests__internal_flag__config_show_with_internal_flag.snap
+++ b/tests/snapshots/integration__integration_tests__internal_flag__config_show_with_internal_flag.snap
@@ -7,6 +7,7 @@ info:
- config
- show
env:
+ APPDATA: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpP7IhTH/.config
CLICOLOR_FORCE: "1"
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
@@ -18,6 +19,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
@@ -27,7 +29,7 @@ exit_code: 0
----- stderr -----
USER CONFIG ~/.config/worktrunk/config.toml
-  worktree-path = "../{{ main_worktree }}.{{ branch }}"
+  worktree-path = "../{{ main_worktree }}.{{ branch }}"
PROJECT CONFIG [REPO]/.config/wt.toml
💡 Not found
@@ -35,4 +37,3 @@ exit_code: 0
⚪ Skipped bash; ~/.bashrc not found
⚪ Skipped zsh; ~/.zshrc not found
⚪ Skipped fish; ~/.config/fish/conf.d not found
-
diff --git a/tests/snapshots/integration__integration_tests__internal_flag__list_with_internal_flag.snap b/tests/snapshots/integration__integration_tests__internal_flag__list_with_internal_flag.snap
index fbc7a9bbe..d84e0c80a 100644
--- a/tests/snapshots/integration__integration_tests__internal_flag__list_with_internal_flag.snap
+++ b/tests/snapshots/integration__integration_tests__internal_flag__list_with_internal_flag.snap
@@ -23,8 +23,7 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ main ^ . b834638e 1d Initial commit
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ main ^ . b834638e 1d Initial commit
-⚪ Showing 1 worktree
-
+⚪ Showing 1 worktree
diff --git a/tests/snapshots/integration__integration_tests__list__branch_only_with_status.snap b/tests/snapshots/integration__integration_tests__list__branch_only_with_status.snap
index d5a3e1b34..57064f33d 100644
--- a/tests/snapshots/integration__integration_tests__list__branch_only_with_status.snap
+++ b/tests/snapshots/integration__integration_tests__list__branch_only_with_status.snap
@@ -23,8 +23,8 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ main ^ . b834638e 1d Initial commit
- branch-only /_ b834638e 1d Initial commit
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ main ^ . b834638e 1d Initial commit
+ branch-only /_ b834638e 1d Initial commit
-⚪ Showing 1 worktrees, 1 branches
+⚪ Showing 1 worktrees, 1 branches
diff --git a/tests/snapshots/integration__integration_tests__list__default_branch_missing_worktree.snap b/tests/snapshots/integration__integration_tests__list__default_branch_missing_worktree.snap
index 802843507..7ff9e629e 100644
--- a/tests/snapshots/integration__integration_tests__list__default_branch_missing_worktree.snap
+++ b/tests/snapshots/integration__integration_tests__list__default_branch_missing_worktree.snap
@@ -22,7 +22,7 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ develop ⚑^ . b834638e 1d Initial commit
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ develop ⚑^ . b834638e 1d Initial commit
-⚪ Showing 1 worktree
+⚪ Showing 1 worktree
diff --git a/tests/snapshots/integration__integration_tests__list__detached_head.snap b/tests/snapshots/integration__integration_tests__list__detached_head.snap
index 52eece078..d9b983cf3 100644
--- a/tests/snapshots/integration__integration_tests__list__detached_head.snap
+++ b/tests/snapshots/integration__integration_tests__list__detached_head.snap
@@ -22,7 +22,7 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ - ⚑^ . b834638e 1d Initial commit
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ - ⚑^ . b834638e 1d Initial commit
-⚪ Showing 1 worktree
+⚪ Showing 1 worktree
diff --git a/tests/snapshots/integration__integration_tests__list__detached_head_in_worktree.snap b/tests/snapshots/integration__integration_tests__list__detached_head_in_worktree.snap
index baaaf7ec1..274e00998 100644
--- a/tests/snapshots/integration__integration_tests__list__detached_head_in_worktree.snap
+++ b/tests/snapshots/integration__integration_tests__list__detached_head_in_worktree.snap
@@ -22,8 +22,8 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ main ^ ./repo b834638e 1d Initial commit
-+ - ⚑_ ./repo.feature b834638e 1d Initial commit
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ main ^ ./repo b834638e 1d Initial commit
++ - ⚑_ ./repo.feature b834638e 1d Initial commit
-⚪ Showing 2 worktrees
+⚪ Showing 2 worktrees
diff --git a/tests/snapshots/integration__integration_tests__list__large_diffs_alignment.snap b/tests/snapshots/integration__integration_tests__list__large_diffs_alignment.snap
index c3f99b979..3d53361cf 100644
--- a/tests/snapshots/integration__integration_tests__list__large_diffs_alignment.snap
+++ b/tests/snapshots/integration__integration_tests__list__large_diffs_alignment.snap
@@ -22,10 +22,10 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ main ^ ./repo b834638e 1d Initial commit
-+ diverged ! ↑ 💬 +40 -60 ↑1 ./repo.diverged 8ba5aa92 1d Diverged commit
-+ feature-changes !? ↑ 🤖 +50 -100 ↑1 ./repo.feature-changes b854b166 1d Add 100 lines
-+ fix ? _ 💬 ./repo.fix b834638e 1d Initial commit
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ main ^ ./repo b834638e 1d Initial commit
++ diverged ! ↑ 💬 +40 -60 ↑1 ./repo.diverged 8ba5aa92 1d Diverged commit
++ feature-changes !? ↑ 🤖 +50 -100 ↑1 ./repo.feature-changes b854b166 1d Add 100 lines
++ fix ? _ 💬 ./repo.fix b834638e 1d Initial commit
-⚪ Showing 4 worktrees, 2 with changes, 2 ahead
+⚪ Showing 4 worktrees, 2 with changes, 2 ahead
diff --git a/tests/snapshots/integration__integration_tests__list__list_ordering_rules.snap b/tests/snapshots/integration__integration_tests__list__list_ordering_rules.snap
index cb42c5dd6..5679fe758 100644
--- a/tests/snapshots/integration__integration_tests__list__list_ordering_rules.snap
+++ b/tests/snapshots/integration__integration_tests__list__list_ordering_rules.snap
@@ -22,11 +22,11 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ feature-current ↑ ↑1 ./repo.feature-current fc28a4d1 23h Commit at 01:00
-^ main ^ ./repo 6c3da842 1d Initial commit on main
-+ feature-newest ↑ ↑1 ./repo.feature-newest 136358eb 21h Commit at 03:00
-+ feature-middle ↑ ↑1 ./repo.feature-middle a0a4851a 22h Commit at 02:00
-+ feature-oldest ↑ ↑1 ./repo.feature-oldest 1b1a2d78 23h Commit at 00:30
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ feature-current ↑ ↑1 ./repo.feature-current fc28a4d1 23h Commit at 01:00
+^ main ^ ./repo 6c3da842 1d Initial commit on main
++ feature-newest ↑ ↑1 ./repo.feature-newest 136358eb 21h Commit at 03:00
++ feature-middle ↑ ↑1 ./repo.feature-middle a0a4851a 22h Commit at 02:00
++ feature-oldest ↑ ↑1 ./repo.feature-oldest 1b1a2d78 23h Commit at 00:30
-⚪ Showing 5 worktrees, 4 ahead
+⚪ Showing 5 worktrees, 4 ahead
diff --git a/tests/snapshots/integration__integration_tests__list__list_primary_on_different_branch.snap b/tests/snapshots/integration__integration_tests__list__list_primary_on_different_branch.snap
index ca4f9fec4..7e96f9d17 100644
--- a/tests/snapshots/integration__integration_tests__list__list_primary_on_different_branch.snap
+++ b/tests/snapshots/integration__integration_tests__list__list_primary_on_different_branch.snap
@@ -22,9 +22,9 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ develop ⚑^ ./repo b834638e 1d Initial commit
-+ feature-a _ ./repo.feature-a b834638e 1d Initial commit
-+ feature-b _ ./repo.feature-b b834638e 1d Initial commit
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ develop ⚑^ ./repo b834638e 1d Initial commit
++ feature-a _ ./repo.feature-a b834638e 1d Initial commit
++ feature-b _ ./repo.feature-b b834638e 1d Initial commit
-⚪ Showing 3 worktrees
+⚪ Showing 3 worktrees
diff --git a/tests/snapshots/integration__integration_tests__list__list_with_c_flag.snap b/tests/snapshots/integration__integration_tests__list__list_with_c_flag.snap
index 1183ccff9..2d93dbb1a 100644
--- a/tests/snapshots/integration__integration_tests__list__list_with_c_flag.snap
+++ b/tests/snapshots/integration__integration_tests__list__list_with_c_flag.snap
@@ -18,9 +18,9 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ main ^ ./repo b834638e 1d Initial commit
-+ feature-a _ ./repo.feature-a b834638e 1d Initial commit
-+ feature-b _ ./repo.feature-b b834638e 1d Initial commit
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ main ^ ./repo b834638e 1d Initial commit
++ feature-a _ ./repo.feature-a b834638e 1d Initial commit
++ feature-b _ ./repo.feature-b b834638e 1d Initial commit
-⚪ Showing 3 worktrees
+⚪ Showing 3 worktrees
diff --git a/tests/snapshots/integration__integration_tests__list__locked_no_reason.snap b/tests/snapshots/integration__integration_tests__list__locked_no_reason.snap
index a73d3ab8a..94969c860 100644
--- a/tests/snapshots/integration__integration_tests__list__locked_no_reason.snap
+++ b/tests/snapshots/integration__integration_tests__list__locked_no_reason.snap
@@ -22,8 +22,8 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ main ^ ./repo b834638e 1d Initial commit
-+ locked-no-reason ⊞_ ./repo.locked-no-reason b834638e 1d Initial commit
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ main ^ ./repo b834638e 1d Initial commit
++ locked-no-reason ⊞_ ./repo.locked-no-reason b834638e 1d Initial commit
-⚪ Showing 2 worktrees
+⚪ Showing 2 worktrees
diff --git a/tests/snapshots/integration__integration_tests__list__locked_worktree.snap b/tests/snapshots/integration__integration_tests__list__locked_worktree.snap
index c149245e7..3227102ce 100644
--- a/tests/snapshots/integration__integration_tests__list__locked_worktree.snap
+++ b/tests/snapshots/integration__integration_tests__list__locked_worktree.snap
@@ -22,8 +22,8 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ main ^ ./repo b834638e 1d Initial commit
-+ locked-feature ⊞_ ./repo.locked-feature b834638e 1d Initial commit
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ main ^ ./repo b834638e 1d Initial commit
++ locked-feature ⊞_ ./repo.locked-feature b834638e 1d Initial commit
-⚪ Showing 2 worktrees
+⚪ Showing 2 worktrees
diff --git a/tests/snapshots/integration__integration_tests__list__long_commit_message.snap b/tests/snapshots/integration__integration_tests__list__long_commit_message.snap
index c3daedd16..401a08c2e 100644
--- a/tests/snapshots/integration__integration_tests__list__long_commit_message.snap
+++ b/tests/snapshots/integration__integration_tests__list__long_commit_message.snap
@@ -22,8 +22,8 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ main ^ ./repo 1310bfb9 1d Short message
-+ feature-a ⊂ ↓1 ./repo.feature-a f078644e 1d This is a very long commit message that should test how the…
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ main ^ ./repo 1310bfb9 1d Short message
++ feature-a ⊂ ↓1 ./repo.feature-a f078644e 1d This is a very long commit message that should test how the…
-⚪ Showing 2 worktrees
+⚪ Showing 2 worktrees
diff --git a/tests/snapshots/integration__integration_tests__list__many_worktrees_varied.snap b/tests/snapshots/integration__integration_tests__list__many_worktrees_varied.snap
index a3da13e18..80150524e 100644
--- a/tests/snapshots/integration__integration_tests__list__many_worktrees_varied.snap
+++ b/tests/snapshots/integration__integration_tests__list__many_worktrees_varied.snap
@@ -22,11 +22,11 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ main ^ ./repo b834638e 1d Initial commit
-+ medium-name _ ./repo.medium-name b834638e 1d Initial commit
-+ short _ ./repo.short b834638e 1d Initial commit
-+ very-long-branch-name-here _ ./repo.very-long-branch-name-here b834638e 1d Initial commit
-+ with-changes _ ./repo.with-changes b834638e 1d Initial commit
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ main ^ ./repo b834638e 1d Initial commit
++ medium-name _ ./repo.medium-name b834638e 1d Initial commit
++ short _ ./repo.short b834638e 1d Initial commit
++ very-long-branch-name-here _ ./repo.very-long-branch-name-here b834638e 1d Initial commit
++ with-changes _ ./repo.with-changes b834638e 1d Initial commit
-⚪ Showing 5 worktrees
+⚪ Showing 5 worktrees
diff --git a/tests/snapshots/integration__integration_tests__list__maximum_status_symbols.snap b/tests/snapshots/integration__integration_tests__list__maximum_status_symbols.snap
index c19f179f4..cf330744c 100644
--- a/tests/snapshots/integration__integration_tests__list__maximum_status_symbols.snap
+++ b/tests/snapshots/integration__integration_tests__list__maximum_status_symbols.snap
@@ -23,8 +23,8 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ main…± Path Remote⇅ CI Commit Age Message
-@ main ^⇡ ./repo ⇡1 85ed6d3d 1d Main advances
-+ feature +!?⊞✗⇅🤖 +2 -2 ↑2 ↓1 +3 -1 ./repo.feature ⇡1 ⇣1 4afb2b9e 1d Local commit
+ Branch Status HEAD± main↕ main…± Path Remote⇅ CI Commit Age Message
+@ main ^⇡ ./repo ⇡1 85ed6d3d 1d Main advances
++ feature +!?⊞✗⇅🤖 +2 -2 ↑2 ↓1 +3 -1 ./repo.feature ⇡1 ⇣1 4afb2b9e 1d Local commit
-⚪ Showing 2 worktrees, 1 with changes, 1 ahead
+⚪ Showing 2 worktrees, 1 with changes, 1 ahead
diff --git a/tests/snapshots/integration__integration_tests__list__maximum_status_with_git_operation.snap b/tests/snapshots/integration__integration_tests__list__maximum_status_with_git_operation.snap
index 5fff8aa35..bf457b00d 100644
--- a/tests/snapshots/integration__integration_tests__list__maximum_status_with_git_operation.snap
+++ b/tests/snapshots/integration__integration_tests__list__maximum_status_with_git_operation.snap
@@ -23,8 +23,8 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ main…± Path Remote⇅ CI Commit Age Message
-@ main ^ ./repo b7c14ce1 1d Main conflicting changes
-+ feature +!?✘ 🤖 +7 ./repo.feature b7c14ce1 1d Main conflicting changes
+ Branch Status HEAD± main↕ main…± Path Remote⇅ CI Commit Age Message
+@ main ^ ./repo b7c14ce1 1d Main conflicting changes
++ feature +!?✘ 🤖 +7 ./repo.feature b7c14ce1 1d Main conflicting changes
-⚪ Showing 2 worktrees, 1 with changes
+⚪ Showing 2 worktrees, 1 with changes
diff --git a/tests/snapshots/integration__integration_tests__list__maximum_working_tree_symbols.snap b/tests/snapshots/integration__integration_tests__list__maximum_working_tree_symbols.snap
index 402a5b36b..7a3bb67fa 100644
--- a/tests/snapshots/integration__integration_tests__list__maximum_working_tree_symbols.snap
+++ b/tests/snapshots/integration__integration_tests__list__maximum_working_tree_symbols.snap
@@ -22,8 +22,8 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ main ^ ./repo b834638e 1d Initial commit
-+ feature +!? ↑ +2 -3 ↑1 ./repo.feature 689c2504 1d Add files
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ main ^ ./repo b834638e 1d Initial commit
++ feature +!? ↑ +2 -3 ↑1 ./repo.feature 689c2504 1d Add files
-⚪ Showing 2 worktrees, 1 with changes, 1 ahead
+⚪ Showing 2 worktrees, 1 with changes, 1 ahead
diff --git a/tests/snapshots/integration__integration_tests__list__multiple_worktrees.snap b/tests/snapshots/integration__integration_tests__list__multiple_worktrees.snap
index 7f739a3d6..30837abd3 100644
--- a/tests/snapshots/integration__integration_tests__list__multiple_worktrees.snap
+++ b/tests/snapshots/integration__integration_tests__list__multiple_worktrees.snap
@@ -22,9 +22,9 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ main ^ ./repo b834638e 1d Initial commit
-+ feature-a _ ./repo.feature-a b834638e 1d Initial commit
-+ feature-b _ ./repo.feature-b b834638e 1d Initial commit
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ main ^ ./repo b834638e 1d Initial commit
++ feature-a _ ./repo.feature-a b834638e 1d Initial commit
++ feature-b _ ./repo.feature-b b834638e 1d Initial commit
-⚪ Showing 3 worktrees
+⚪ Showing 3 worktrees
diff --git a/tests/snapshots/integration__integration_tests__list__no_progressive_flag.snap b/tests/snapshots/integration__integration_tests__list__no_progressive_flag.snap
index 4e685e154..b099ac998 100644
--- a/tests/snapshots/integration__integration_tests__list__no_progressive_flag.snap
+++ b/tests/snapshots/integration__integration_tests__list__no_progressive_flag.snap
@@ -23,8 +23,8 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ main ^ ./repo b834638e 1d Initial commit
-+ feature _ ./repo.feature b834638e 1d Initial commit
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ main ^ ./repo b834638e 1d Initial commit
++ feature _ ./repo.feature b834638e 1d Initial commit
-⚪ Showing 2 worktrees
+⚪ Showing 2 worktrees
diff --git a/tests/snapshots/integration__integration_tests__list__previous_worktree_gutter.snap b/tests/snapshots/integration__integration_tests__list__previous_worktree_gutter.snap
index aee9a8b2c..eacbfbb5e 100644
--- a/tests/snapshots/integration__integration_tests__list__previous_worktree_gutter.snap
+++ b/tests/snapshots/integration__integration_tests__list__previous_worktree_gutter.snap
@@ -22,8 +22,8 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ main ^ ./repo b834638e 1d Initial commit
-- feature _ ./repo.feature b834638e 1d Initial commit
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ main ^ ./repo b834638e 1d Initial commit
+- feature _ ./repo.feature b834638e 1d Initial commit
-⚪ Showing 2 worktrees
+⚪ Showing 2 worktrees
diff --git a/tests/snapshots/integration__integration_tests__list__progressive_flag.snap b/tests/snapshots/integration__integration_tests__list__progressive_flag.snap
index a52312d3b..c9d125eee 100644
--- a/tests/snapshots/integration__integration_tests__list__progressive_flag.snap
+++ b/tests/snapshots/integration__integration_tests__list__progressive_flag.snap
@@ -23,9 +23,9 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ main ^ ./repo b834638e 1d Initial commit
-+ feature-a _ ./repo.feature-a b834638e 1d Initial commit
-+ feature-b _ ./repo.feature-b b834638e 1d Initial commit
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ main ^ ./repo b834638e 1d Initial commit
++ feature-a _ ./repo.feature-a b834638e 1d Initial commit
++ feature-b _ ./repo.feature-b b834638e 1d Initial commit
-⚪ Showing 3 worktrees
+⚪ Showing 3 worktrees
diff --git a/tests/snapshots/integration__integration_tests__list__progressive_with_branches.snap b/tests/snapshots/integration__integration_tests__list__progressive_with_branches.snap
index 07cea90b0..bdbc27cf5 100644
--- a/tests/snapshots/integration__integration_tests__list__progressive_with_branches.snap
+++ b/tests/snapshots/integration__integration_tests__list__progressive_with_branches.snap
@@ -24,10 +24,10 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ main ^ ./repo b834638e 1d Initial commit
-+ feature-a _ ./repo.feature-a b834638e 1d Initial commit
- orphan-1 /_ b834638e 1d Initial commit
- orphan-2 /_ b834638e 1d Initial commit
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ main ^ ./repo b834638e 1d Initial commit
++ feature-a _ ./repo.feature-a b834638e 1d Initial commit
+ orphan-1 /_ b834638e 1d Initial commit
+ orphan-2 /_ b834638e 1d Initial commit
-⚪ Showing 2 worktrees, 2 branches
+⚪ Showing 2 worktrees, 2 branches
diff --git a/tests/snapshots/integration__integration_tests__list__readme_example_list.snap b/tests/snapshots/integration__integration_tests__list__readme_example_list.snap
index ca7c3bd9e..64fcdfc7b 100644
--- a/tests/snapshots/integration__integration_tests__list__readme_example_list.snap
+++ b/tests/snapshots/integration__integration_tests__list__readme_example_list.snap
@@ -22,9 +22,9 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ feature-api + ↕⇡ +54 -5 ↑4 ↓1 ./repo.feature-api ⇡3 28d38c20 30m Add API tests
-^ main ^⇅ ./repo ⇡1 ⇣1 2e6b7a8f 4d Merge fix-auth:…
-+ fix-auth ↕| ↑2 ↓1 ./repo.fix-auth | 1d697d5b 5h Add secure token…
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ feature-api + ↕⇡ +54 -5 ↑4 ↓1 ./repo.feature-api ⇡3 28d38c20 30m Add API tests
+^ main ^⇅ ./repo ⇡1 ⇣1 2e6b7a8f 4d Merge fix-auth:…
++ fix-auth ↕| ↑2 ↓1 ./repo.fix-auth | 1d697d5b 5h Add secure token…
-⚪ Showing 3 worktrees, 1 with changes, 2 ahead
+⚪ Showing 3 worktrees, 1 with changes, 2 ahead
diff --git a/tests/snapshots/integration__integration_tests__list__readme_example_list_branches.snap b/tests/snapshots/integration__integration_tests__list__readme_example_list_branches.snap
index 45d5157dc..c2af730d1 100644
--- a/tests/snapshots/integration__integration_tests__list__readme_example_list_branches.snap
+++ b/tests/snapshots/integration__integration_tests__list__readme_example_list_branches.snap
@@ -24,11 +24,11 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ main…± Path Remote⇅ CI Commit Age
-@ feature-api + ↕⇡ +54 -5 ↑4 ↓1 +234 -24 ./repo.feature-api ⇡3 ● 28d38c20 30m
-^ main ^⇅ ./repo ⇡1 ⇣1 ● 2e6b7a8f 4d
-+ fix-auth ↕| ↑2 ↓1 +25 -11 ./repo.fix-auth | ● 1d697d5b 5h
- exp /↕ ↑2 ↓1 +137 32936618 2d
- wip /↕ ↑1 ↓1 +33 6844b101 3d
+ Branch Status HEAD± main↕ main…± Path Remote⇅ CI Commit Age
+@ feature-api + ↕⇡ +54 -5 ↑4 ↓1 +234 -24 ./repo.feature-api ⇡3 ● 28d38c20 30m
+^ main ^⇅ ./repo ⇡1 ⇣1 ● 2e6b7a8f 4d
++ fix-auth ↕| ↑2 ↓1 +25 -11 ./repo.fix-auth | ● 1d697d5b 5h
+ exp /↕ ↑2 ↓1 +137 32936618 2d
+ wip /↕ ↑1 ↓1 +33 6844b101 3d
-⚪ Showing 3 worktrees, 2 branches, 1 with changes, 4 ahead, 1 column hidden
+⚪ Showing 3 worktrees, 2 branches, 1 with changes, 4 ahead, 1 column hidden
diff --git a/tests/snapshots/integration__integration_tests__list__readme_example_list_full.snap b/tests/snapshots/integration__integration_tests__list__readme_example_list_full.snap
index 6bcd2f243..9c2843e18 100644
--- a/tests/snapshots/integration__integration_tests__list__readme_example_list_full.snap
+++ b/tests/snapshots/integration__integration_tests__list__readme_example_list_full.snap
@@ -23,9 +23,9 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ main…± Path Remote⇅ CI Commit Age
-@ feature-api + ↕⇡ +54 -5 ↑4 ↓1 +234 -24 ./repo.feature-api ⇡3 ● 28d38c20 30m
-^ main ^⇅ ./repo ⇡1 ⇣1 ● 2e6b7a8f 4d
-+ fix-auth ↕| ↑2 ↓1 +25 -11 ./repo.fix-auth | ● 1d697d5b 5h
+ Branch Status HEAD± main↕ main…± Path Remote⇅ CI Commit Age
+@ feature-api + ↕⇡ +54 -5 ↑4 ↓1 +234 -24 ./repo.feature-api ⇡3 ● 28d38c20 30m
+^ main ^⇅ ./repo ⇡1 ⇣1 ● 2e6b7a8f 4d
++ fix-auth ↕| ↑2 ↓1 +25 -11 ./repo.fix-auth | ● 1d697d5b 5h
-⚪ Showing 3 worktrees, 1 with changes, 2 ahead, 1 column hidden
+⚪ Showing 3 worktrees, 1 with changes, 2 ahead, 1 column hidden
diff --git a/tests/snapshots/integration__integration_tests__list__single_worktree.snap b/tests/snapshots/integration__integration_tests__list__single_worktree.snap
index 1a3d338f4..dad874d2c 100644
--- a/tests/snapshots/integration__integration_tests__list__single_worktree.snap
+++ b/tests/snapshots/integration__integration_tests__list__single_worktree.snap
@@ -22,7 +22,7 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ main ^ . b834638e 1d Initial commit
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ main ^ . b834638e 1d Initial commit
-⚪ Showing 1 worktree
+⚪ Showing 1 worktree
diff --git a/tests/snapshots/integration__integration_tests__list__status_column_padding_emoji.snap b/tests/snapshots/integration__integration_tests__list__status_column_padding_emoji.snap
index fe96ba77f..a6ebe72f4 100644
--- a/tests/snapshots/integration__integration_tests__list__status_column_padding_emoji.snap
+++ b/tests/snapshots/integration__integration_tests__list__status_column_padding_emoji.snap
@@ -22,10 +22,10 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ main ^ ./repo b834638e 1d Initial commit
-+ main-symbol ↑ 💬 ↑1 ./repo.main-symbol 579fcd0b 1d Symbol commit
-+ pr-link ↑ 🤖 ↑1 ./repo.pr-link e17e7d2d 1d PR commit
-+ wli-sequence !? ↑ 🤖 +1 -112 ↑1 ./repo.wli-sequence a2483ffd 1d Initial content
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ main ^ ./repo b834638e 1d Initial commit
++ main-symbol ↑ 💬 ↑1 ./repo.main-symbol 579fcd0b 1d Symbol commit
++ pr-link ↑ 🤖 ↑1 ./repo.pr-link e17e7d2d 1d PR commit
++ wli-sequence !? ↑ 🤖 +1 -112 ↑1 ./repo.wli-sequence a2483ffd 1d Initial content
-⚪ Showing 4 worktrees, 1 with changes, 3 ahead
+⚪ Showing 4 worktrees, 1 with changes, 3 ahead
diff --git a/tests/snapshots/integration__integration_tests__list__task_dag_detached_head.snap b/tests/snapshots/integration__integration_tests__list__task_dag_detached_head.snap
index dcb502a85..0c9329297 100644
--- a/tests/snapshots/integration__integration_tests__list__task_dag_detached_head.snap
+++ b/tests/snapshots/integration__integration_tests__list__task_dag_detached_head.snap
@@ -23,7 +23,7 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ - ⚑^ . b834638e 1d Initial commit
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ - ⚑^ . b834638e 1d Initial commit
-⚪ Showing 1 worktree
+⚪ Showing 1 worktree
diff --git a/tests/snapshots/integration__integration_tests__list__task_dag_full_with_diffs.snap b/tests/snapshots/integration__integration_tests__list__task_dag_full_with_diffs.snap
index 8c2a5f423..2f3480350 100644
--- a/tests/snapshots/integration__integration_tests__list__task_dag_full_with_diffs.snap
+++ b/tests/snapshots/integration__integration_tests__list__task_dag_full_with_diffs.snap
@@ -24,9 +24,9 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ main…± Path Remote⇅ CI Commit Age Message
-@ main ^ ./repo b834638e 1d Initial commit
-+ feature-a ? _ ./repo.feature-a b834638e 1d Initial commit
-+ feature-b ↑ ↑1 +1 -1 ./repo.feature-b 2d37ca75 1d Test commit
+ Branch Status HEAD± main↕ main…± Path Remote⇅ CI Commit Age Message
+@ main ^ ./repo b834638e 1d Initial commit
++ feature-a ? _ ./repo.feature-a b834638e 1d Initial commit
++ feature-b ↑ ↑1 +1 -1 ./repo.feature-b 2d37ca75 1d Test commit
-⚪ Showing 3 worktrees, 1 ahead
+⚪ Showing 3 worktrees, 1 ahead
diff --git a/tests/snapshots/integration__integration_tests__list__task_dag_many_worktrees.snap b/tests/snapshots/integration__integration_tests__list__task_dag_many_worktrees.snap
index 17ed84131..be1c3f34a 100644
--- a/tests/snapshots/integration__integration_tests__list__task_dag_many_worktrees.snap
+++ b/tests/snapshots/integration__integration_tests__list__task_dag_many_worktrees.snap
@@ -23,17 +23,17 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ main ^ ./repo b834638e 1d Initial commit
-+ feature-1 _ ./repo.feature-1 b834638e 1d Initial commit
-+ feature-10 _ ./repo.feature-10 b834638e 1d Initial commit
-+ feature-2 _ ./repo.feature-2 b834638e 1d Initial commit
-+ feature-3 _ ./repo.feature-3 b834638e 1d Initial commit
-+ feature-4 _ ./repo.feature-4 b834638e 1d Initial commit
-+ feature-5 _ ./repo.feature-5 b834638e 1d Initial commit
-+ feature-6 _ ./repo.feature-6 b834638e 1d Initial commit
-+ feature-7 _ ./repo.feature-7 b834638e 1d Initial commit
-+ feature-8 _ ./repo.feature-8 b834638e 1d Initial commit
-+ feature-9 _ ./repo.feature-9 b834638e 1d Initial commit
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ main ^ ./repo b834638e 1d Initial commit
++ feature-1 _ ./repo.feature-1 b834638e 1d Initial commit
++ feature-10 _ ./repo.feature-10 b834638e 1d Initial commit
++ feature-2 _ ./repo.feature-2 b834638e 1d Initial commit
++ feature-3 _ ./repo.feature-3 b834638e 1d Initial commit
++ feature-4 _ ./repo.feature-4 b834638e 1d Initial commit
++ feature-5 _ ./repo.feature-5 b834638e 1d Initial commit
++ feature-6 _ ./repo.feature-6 b834638e 1d Initial commit
++ feature-7 _ ./repo.feature-7 b834638e 1d Initial commit
++ feature-8 _ ./repo.feature-8 b834638e 1d Initial commit
++ feature-9 _ ./repo.feature-9 b834638e 1d Initial commit
-⚪ Showing 11 worktrees
+⚪ Showing 11 worktrees
diff --git a/tests/snapshots/integration__integration_tests__list__task_dag_multiple_worktrees.snap b/tests/snapshots/integration__integration_tests__list__task_dag_multiple_worktrees.snap
index 794f31037..3739e1e01 100644
--- a/tests/snapshots/integration__integration_tests__list__task_dag_multiple_worktrees.snap
+++ b/tests/snapshots/integration__integration_tests__list__task_dag_multiple_worktrees.snap
@@ -23,10 +23,10 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ main ^ ./repo b834638e 1d Initial commit
-+ feature-a _ ./repo.feature-a b834638e 1d Initial commit
-+ feature-b _ ./repo.feature-b b834638e 1d Initial commit
-+ feature-c _ ./repo.feature-c b834638e 1d Initial commit
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ main ^ ./repo b834638e 1d Initial commit
++ feature-a _ ./repo.feature-a b834638e 1d Initial commit
++ feature-b _ ./repo.feature-b b834638e 1d Initial commit
++ feature-c _ ./repo.feature-c b834638e 1d Initial commit
-⚪ Showing 4 worktrees
+⚪ Showing 4 worktrees
diff --git a/tests/snapshots/integration__integration_tests__list__task_dag_ordering_stability.snap b/tests/snapshots/integration__integration_tests__list__task_dag_ordering_stability.snap
index 9c21669cc..5e85060cc 100644
--- a/tests/snapshots/integration__integration_tests__list__task_dag_ordering_stability.snap
+++ b/tests/snapshots/integration__integration_tests__list__task_dag_ordering_stability.snap
@@ -23,11 +23,11 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ feature-current ↑ ↑1 ./repo.feature-current fc28a4d1 23h Commit at 01:00
-^ main ^ ./repo 6c3da842 1d Initial commit on main
-+ feature-newest ↑ ↑1 ./repo.feature-newest 136358eb 21h Commit at 03:00
-+ feature-middle ↑ ↑1 ./repo.feature-middle a0a4851a 22h Commit at 02:00
-+ feature-oldest ↑ ↑1 ./repo.feature-oldest 1b1a2d78 23h Commit at 00:30
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ feature-current ↑ ↑1 ./repo.feature-current fc28a4d1 23h Commit at 01:00
+^ main ^ ./repo 6c3da842 1d Initial commit on main
++ feature-newest ↑ ↑1 ./repo.feature-newest 136358eb 21h Commit at 03:00
++ feature-middle ↑ ↑1 ./repo.feature-middle a0a4851a 22h Commit at 02:00
++ feature-oldest ↑ ↑1 ./repo.feature-oldest 1b1a2d78 23h Commit at 00:30
-⚪ Showing 5 worktrees, 4 ahead
+⚪ Showing 5 worktrees, 4 ahead
diff --git a/tests/snapshots/integration__integration_tests__list__task_dag_single_worktree.snap b/tests/snapshots/integration__integration_tests__list__task_dag_single_worktree.snap
index f77e987dc..9851bf25a 100644
--- a/tests/snapshots/integration__integration_tests__list__task_dag_single_worktree.snap
+++ b/tests/snapshots/integration__integration_tests__list__task_dag_single_worktree.snap
@@ -23,7 +23,7 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ main ^ . b834638e 1d Initial commit
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ main ^ . b834638e 1d Initial commit
-⚪ Showing 1 worktree
+⚪ Showing 1 worktree
diff --git a/tests/snapshots/integration__integration_tests__list__task_dag_with_locked.snap b/tests/snapshots/integration__integration_tests__list__task_dag_with_locked.snap
index c43e6f024..6f51bf4d8 100644
--- a/tests/snapshots/integration__integration_tests__list__task_dag_with_locked.snap
+++ b/tests/snapshots/integration__integration_tests__list__task_dag_with_locked.snap
@@ -23,9 +23,9 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ main ^ ./repo b834638e 1d Initial commit
-+ locked ⊞_ ./repo.locked b834638e 1d Initial commit
-+ normal _ ./repo.normal b834638e 1d Initial commit
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ main ^ ./repo b834638e 1d Initial commit
++ locked ⊞_ ./repo.locked b834638e 1d Initial commit
++ normal _ ./repo.normal b834638e 1d Initial commit
-⚪ Showing 3 worktrees
+⚪ Showing 3 worktrees
diff --git a/tests/snapshots/integration__integration_tests__list__task_dag_with_upstream.snap b/tests/snapshots/integration__integration_tests__list__task_dag_with_upstream.snap
index 3a3b68d69..3df6798f0 100644
--- a/tests/snapshots/integration__integration_tests__list__task_dag_with_upstream.snap
+++ b/tests/snapshots/integration__integration_tests__list__task_dag_with_upstream.snap
@@ -24,9 +24,9 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ main…± Path Remote⇅ CI Commit Age Message
-@ main ^| ./repo | 6c3da842 1d Initial commit on main
-+ ahead ↑⇡ ↑1 +1 ./repo.ahead ⇡1 2fff52c2 1d Ahead commit
-+ in-sync _| ./repo.in-sync | 6c3da842 1d Initial commit on main
+ Branch Status HEAD± main↕ main…± Path Remote⇅ CI Commit Age Message
+@ main ^| ./repo | 6c3da842 1d Initial commit on main
++ ahead ↑⇡ ↑1 +1 ./repo.ahead ⇡1 2fff52c2 1d Ahead commit
++ in-sync _| ./repo.in-sync | 6c3da842 1d Initial commit on main
-⚪ Showing 3 worktrees, 1 ahead
+⚪ Showing 3 worktrees, 1 ahead
diff --git a/tests/snapshots/integration__integration_tests__list__unicode_commit_message.snap b/tests/snapshots/integration__integration_tests__list__unicode_commit_message.snap
index 6928483e7..5ccd4941c 100644
--- a/tests/snapshots/integration__integration_tests__list__unicode_commit_message.snap
+++ b/tests/snapshots/integration__integration_tests__list__unicode_commit_message.snap
@@ -22,8 +22,8 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ main ^ ./repo e4614cb7 1d Fix bug with café ☕ handling
-+ feature-test ⊂ ↓1 ./repo.feature-test 0c53695b 1d Add support for 日本語 and émoji 🎉
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ main ^ ./repo e4614cb7 1d Fix bug with café ☕ handling
++ feature-test ⊂ ↓1 ./repo.feature-test 0c53695b 1d Add support for 日本語 and émoji 🎉
-⚪ Showing 2 worktrees
+⚪ Showing 2 worktrees
diff --git a/tests/snapshots/integration__integration_tests__list__user_marker_special_chars.snap b/tests/snapshots/integration__integration_tests__list__user_marker_special_chars.snap
index fe5fd663b..379078da1 100644
--- a/tests/snapshots/integration__integration_tests__list__user_marker_special_chars.snap
+++ b/tests/snapshots/integration__integration_tests__list__user_marker_special_chars.snap
@@ -22,9 +22,9 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ main ^ ./repo b834638e 1d Initial commit
-+ emoji _ 🔄 ./repo.emoji b834638e 1d Initial commit
-+ multi _ 👨‍💻 ./repo.multi b834638e 1d Initial commit
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ main ^ ./repo b834638e 1d Initial commit
++ emoji _ 🔄 ./repo.emoji b834638e 1d Initial commit
++ multi _ 👨‍💻 ./repo.multi b834638e 1d Initial commit
-⚪ Showing 3 worktrees
+⚪ Showing 3 worktrees
diff --git a/tests/snapshots/integration__integration_tests__list__with_branches_flag.snap b/tests/snapshots/integration__integration_tests__list__with_branches_flag.snap
index 7611b64f4..43a991f9b 100644
--- a/tests/snapshots/integration__integration_tests__list__with_branches_flag.snap
+++ b/tests/snapshots/integration__integration_tests__list__with_branches_flag.snap
@@ -23,11 +23,11 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ main ^ ./repo b834638e 1d Initial commit
-+ feature-with-worktree _ ./repo.feature-with-worktree b834638e 1d Initial commit
- another-branch /_ b834638e 1d Initial commit
- feature-without-worktree /_ b834638e 1d Initial commit
- fix-bug /_ b834638e 1d Initial commit
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ main ^ ./repo b834638e 1d Initial commit
++ feature-with-worktree _ ./repo.feature-with-worktree b834638e 1d Initial commit
+ another-branch /_ b834638e 1d Initial commit
+ feature-without-worktree /_ b834638e 1d Initial commit
+ fix-bug /_ b834638e 1d Initial commit
-⚪ Showing 2 worktrees, 3 branches
+⚪ Showing 2 worktrees, 3 branches
diff --git a/tests/snapshots/integration__integration_tests__list__with_branches_flag_none_available.snap b/tests/snapshots/integration__integration_tests__list__with_branches_flag_none_available.snap
index 44849c087..0eb3788c8 100644
--- a/tests/snapshots/integration__integration_tests__list__with_branches_flag_none_available.snap
+++ b/tests/snapshots/integration__integration_tests__list__with_branches_flag_none_available.snap
@@ -23,9 +23,9 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ main ^ ./repo b834638e 1d Initial commit
-+ feature-a _ ./repo.feature-a b834638e 1d Initial commit
-+ feature-b _ ./repo.feature-b b834638e 1d Initial commit
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ main ^ ./repo b834638e 1d Initial commit
++ feature-a _ ./repo.feature-a b834638e 1d Initial commit
++ feature-b _ ./repo.feature-b b834638e 1d Initial commit
-⚪ Showing 3 worktrees
+⚪ Showing 3 worktrees
diff --git a/tests/snapshots/integration__integration_tests__list__with_branches_flag_only_branches.snap b/tests/snapshots/integration__integration_tests__list__with_branches_flag_only_branches.snap
index 4c2fe23c2..ec50436e7 100644
--- a/tests/snapshots/integration__integration_tests__list__with_branches_flag_only_branches.snap
+++ b/tests/snapshots/integration__integration_tests__list__with_branches_flag_only_branches.snap
@@ -23,10 +23,10 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ main ^ . b834638e 1d Initial commit
- branch-alpha /_ b834638e 1d Initial commit
- branch-beta /_ b834638e 1d Initial commit
- branch-gamma /_ b834638e 1d Initial commit
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ main ^ . b834638e 1d Initial commit
+ branch-alpha /_ b834638e 1d Initial commit
+ branch-beta /_ b834638e 1d Initial commit
+ branch-gamma /_ b834638e 1d Initial commit
-⚪ Showing 1 worktrees, 3 branches
+⚪ Showing 1 worktrees, 3 branches
diff --git a/tests/snapshots/integration__integration_tests__list__with_remotes_and_branches.snap b/tests/snapshots/integration__integration_tests__list__with_remotes_and_branches.snap
index 46daaa9c7..c20ff157d 100644
--- a/tests/snapshots/integration__integration_tests__list__with_remotes_and_branches.snap
+++ b/tests/snapshots/integration__integration_tests__list__with_remotes_and_branches.snap
@@ -24,11 +24,11 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ main ^| . | b834638e 1d Initial commit
- local-only-1 /_ b834638e 1d Initial commit
- local-only-2 /_ b834638e 1d Initial commit
- origin/remote-only-1 /_ b834638e 1d Initial commit
- origin/remote-only-2 /_ b834638e 1d Initial commit
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ main ^| . | b834638e 1d Initial commit
+ local-only-1 /_ b834638e 1d Initial commit
+ local-only-2 /_ b834638e 1d Initial commit
+ origin/remote-only-1 /_ b834638e 1d Initial commit
+ origin/remote-only-2 /_ b834638e 1d Initial commit
-⚪ Showing 1 worktrees, 2 branches, 2 remote branches
+⚪ Showing 1 worktrees, 2 branches, 2 remote branches
diff --git a/tests/snapshots/integration__integration_tests__list__with_remotes_filters_worktrees.snap b/tests/snapshots/integration__integration_tests__list__with_remotes_filters_worktrees.snap
index 124961f8e..865ee7241 100644
--- a/tests/snapshots/integration__integration_tests__list__with_remotes_filters_worktrees.snap
+++ b/tests/snapshots/integration__integration_tests__list__with_remotes_filters_worktrees.snap
@@ -23,9 +23,9 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ main ^| ./repo | b834638e 1d Initial commit
-+ feature-with-worktree _ ./repo.feature-with-worktree b834638e 1d Initial commit
- origin/remote-only /_ b834638e 1d Initial commit
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ main ^| ./repo | b834638e 1d Initial commit
++ feature-with-worktree _ ./repo.feature-with-worktree b834638e 1d Initial commit
+ origin/remote-only /_ b834638e 1d Initial commit
-⚪ Showing 2 worktrees, 1 remote branches
+⚪ Showing 2 worktrees, 1 remote branches
diff --git a/tests/snapshots/integration__integration_tests__list__with_remotes_flag.snap b/tests/snapshots/integration__integration_tests__list__with_remotes_flag.snap
index b06e8e67b..229a522db 100644
--- a/tests/snapshots/integration__integration_tests__list__with_remotes_flag.snap
+++ b/tests/snapshots/integration__integration_tests__list__with_remotes_flag.snap
@@ -23,9 +23,9 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ main ^| . | b834638e 1d Initial commit
- origin/remote-feature-1 /_ b834638e 1d Initial commit
- origin/remote-feature-2 /_ b834638e 1d Initial commit
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ main ^| . | b834638e 1d Initial commit
+ origin/remote-feature-1 /_ b834638e 1d Initial commit
+ origin/remote-feature-2 /_ b834638e 1d Initial commit
-⚪ Showing 1 worktrees, 2 remote branches
+⚪ Showing 1 worktrees, 2 remote branches
diff --git a/tests/snapshots/integration__integration_tests__list__with_upstream_tracking.snap b/tests/snapshots/integration__integration_tests__list__with_upstream_tracking.snap
index bbf4c4159..4652bdbd2 100644
--- a/tests/snapshots/integration__integration_tests__list__with_upstream_tracking.snap
+++ b/tests/snapshots/integration__integration_tests__list__with_upstream_tracking.snap
@@ -25,12 +25,12 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ main…± Path Remote⇅ CI Commit Age Message
-@ main ^| ./repo | 6c3da842 1d Initial commit on main
-+ ahead ↑⇡ ↑2 +2 ./repo.ahead ⇡2 8d8f4673 1d Ahead commit 2
-+ behind _⇣ ./repo.behind ⇣1 6c3da842 1d Initial commit on main
-+ diverged ↑⇅ ↑1 +1 ./repo.diverged ⇡1 ⇣1 ca7cb696 1d Diverged local commit
-+ in-sync _| ./repo.in-sync | 6c3da842 1d Initial commit on main
-+ no-upstream _ ./repo.no-upstream 6c3da842 1d Initial commit on main
+ Branch Status HEAD± main↕ main…± Path Remote⇅ CI Commit Age Message
+@ main ^| ./repo | 6c3da842 1d Initial commit on main
++ ahead ↑⇡ ↑2 +2 ./repo.ahead ⇡2 8d8f4673 1d Ahead commit 2
++ behind _⇣ ./repo.behind ⇣1 6c3da842 1d Initial commit on main
++ diverged ↑⇅ ↑1 +1 ./repo.diverged ⇡1 ⇣1 ca7cb696 1d Diverged local commit
++ in-sync _| ./repo.in-sync | 6c3da842 1d Initial commit on main
++ no-upstream _ ./repo.no-upstream 6c3da842 1d Initial commit on main
-⚪ Showing 6 worktrees, 2 ahead
+⚪ Showing 6 worktrees, 2 ahead
diff --git a/tests/snapshots/integration__integration_tests__list__with_user_marker.snap b/tests/snapshots/integration__integration_tests__list__with_user_marker.snap
index 923b9c28e..c72cf83ec 100644
--- a/tests/snapshots/integration__integration_tests__list__with_user_marker.snap
+++ b/tests/snapshots/integration__integration_tests__list__with_user_marker.snap
@@ -22,10 +22,10 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ main ^ ./repo b834638e 1d Initial commit
-+ feature-api ↑ 🤖 ↑1 ./repo.feature-api 9606cd0f 1d Add REST API endpoints
-+ review-ui ? ↑ 💬 ↑1 ./repo.review-ui afd3b353 1d Add dashboard component
-+ wip-docs ? _ ./repo.wip-docs b834638e 1d Initial commit
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ main ^ ./repo b834638e 1d Initial commit
++ feature-api ↑ 🤖 ↑1 ./repo.feature-api 9606cd0f 1d Add REST API endpoints
++ review-ui ? ↑ 💬 ↑1 ./repo.review-ui afd3b353 1d Add dashboard component
++ wip-docs ? _ ./repo.wip-docs b834638e 1d Initial commit
-⚪ Showing 4 worktrees, 2 ahead
+⚪ Showing 4 worktrees, 2 ahead
diff --git a/tests/snapshots/integration__integration_tests__list_column_alignment__status_column_alignment_check.snap b/tests/snapshots/integration__integration_tests__list_column_alignment__status_column_alignment_check.snap
index d269ab504..3aa2d18f9 100644
--- a/tests/snapshots/integration__integration_tests__list_column_alignment__status_column_alignment_check.snap
+++ b/tests/snapshots/integration__integration_tests__list_column_alignment__status_column_alignment_check.snap
@@ -22,8 +22,8 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ main ^ ./repo b834638e 1d Initial commit
-+ test +!? +1 -1 ./repo.test b834638e 1d Initial commit
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ main ^ ./repo b834638e 1d Initial commit
++ test +!? +1 -1 ./repo.test b834638e 1d Initial commit
-⚪ Showing 2 worktrees, 1 with changes
+⚪ Showing 2 worktrees, 1 with changes
diff --git a/tests/snapshots/integration__integration_tests__list_column_alignment__status_column_width_consistency.snap b/tests/snapshots/integration__integration_tests__list_column_alignment__status_column_width_consistency.snap
index f141f1023..95f5cfac9 100644
--- a/tests/snapshots/integration__integration_tests__list_column_alignment__status_column_width_consistency.snap
+++ b/tests/snapshots/integration__integration_tests__list_column_alignment__status_column_width_consistency.snap
@@ -22,9 +22,9 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ main ^ ./repo b834638e 1d Initial commit
-+ complex !? +1 -1 ./repo.complex b834638e 1d Initial commit
-+ simple + ? +1 -1 ./repo.simple b834638e 1d Initial commit
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ main ^ ./repo b834638e 1d Initial commit
++ complex !? +1 -1 ./repo.complex b834638e 1d Initial commit
++ simple + ? +1 -1 ./repo.simple b834638e 1d Initial commit
-⚪ Showing 3 worktrees, 2 with changes
+⚪ Showing 3 worktrees, 2 with changes
diff --git a/tests/snapshots/integration__integration_tests__list_config__list_config_branches_enabled.snap b/tests/snapshots/integration__integration_tests__list_config__list_config_branches_enabled.snap
index d7aaf3260..55c871a98 100644
--- a/tests/snapshots/integration__integration_tests__list_config__list_config_branches_enabled.snap
+++ b/tests/snapshots/integration__integration_tests__list_config__list_config_branches_enabled.snap
@@ -16,6 +16,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
@@ -24,7 +25,7 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ main ^ . b834638e 1d Initial commit
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ main ^ . b834638e 1d Initial commit
-⚪ Showing 1 worktree
+⚪ Showing 1 worktree
diff --git a/tests/snapshots/integration__integration_tests__list_config__list_config_cli_override.snap b/tests/snapshots/integration__integration_tests__list_config__list_config_cli_override.snap
index dc03be2fd..c3be9fa36 100644
--- a/tests/snapshots/integration__integration_tests__list_config__list_config_cli_override.snap
+++ b/tests/snapshots/integration__integration_tests__list_config__list_config_cli_override.snap
@@ -17,6 +17,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
@@ -25,8 +26,8 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ main ^ . b834638e 1d Initial commit
- feature /_ b834638e 1d Initial commit
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ main ^ . b834638e 1d Initial commit
+ feature /_ b834638e 1d Initial commit
-⚪ Showing 1 worktrees, 1 branches
+⚪ Showing 1 worktrees, 1 branches
diff --git a/tests/snapshots/integration__integration_tests__list_config__list_config_full_and_branches.snap b/tests/snapshots/integration__integration_tests__list_config__list_config_full_and_branches.snap
index d7aaf3260..55c871a98 100644
--- a/tests/snapshots/integration__integration_tests__list_config__list_config_full_and_branches.snap
+++ b/tests/snapshots/integration__integration_tests__list_config__list_config_full_and_branches.snap
@@ -16,6 +16,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
@@ -24,7 +25,7 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ main ^ . b834638e 1d Initial commit
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ main ^ . b834638e 1d Initial commit
-⚪ Showing 1 worktree
+⚪ Showing 1 worktree
diff --git a/tests/snapshots/integration__integration_tests__list_config__list_config_full_enabled.snap b/tests/snapshots/integration__integration_tests__list_config__list_config_full_enabled.snap
index d7aaf3260..55c871a98 100644
--- a/tests/snapshots/integration__integration_tests__list_config__list_config_full_enabled.snap
+++ b/tests/snapshots/integration__integration_tests__list_config__list_config_full_enabled.snap
@@ -16,6 +16,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
@@ -24,7 +25,7 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ main ^ . b834638e 1d Initial commit
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ main ^ . b834638e 1d Initial commit
-⚪ Showing 1 worktree
+⚪ Showing 1 worktree
diff --git a/tests/snapshots/integration__integration_tests__list_config__list_no_config.snap b/tests/snapshots/integration__integration_tests__list_config__list_no_config.snap
index d7aaf3260..55c871a98 100644
--- a/tests/snapshots/integration__integration_tests__list_config__list_no_config.snap
+++ b/tests/snapshots/integration__integration_tests__list_config__list_no_config.snap
@@ -16,6 +16,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
@@ -24,7 +25,7 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ main ^ . b834638e 1d Initial commit
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ main ^ . b834638e 1d Initial commit
-⚪ Showing 1 worktree
+⚪ Showing 1 worktree
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 c6c999c09..af850237e 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
@@ -31,7 +31,7 @@ exit_code: 1
✅ Merged to main (1 commit, 1 file, +1)
🔄 Removing feature worktree & branch in background (already in main)
🔄 Running project post-merge:
-  exit 1
+  exit 1
🟡 Command failed: exit status: 1
❌ post-merge command failed: 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 2137ea73b..ba65460b2 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
@@ -31,7 +31,6 @@ exit_code: 0
✅ Merged to main (1 commit, 1 file, +1)
🔄 Removing feature worktree & branch in background (already in main)
🔄 Running project post-merge notify:
-  echo 'Merge to main complete' > notify.txt
+  echo 'Merge to main complete' > notify.txt
🔄 Running project post-merge deploy:
-  echo 'Deploying branch feature' > deploy.txt
-
+  echo 'Deploying branch feature' > deploy.txt
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 c6e558e00..944b07fdc 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
@@ -31,5 +31,4 @@ exit_code: 0
✅ Merged to main (1 commit, 1 file, +1)
🔄 Removing feature worktree & branch in background (already in main)
🔄 Running project post-merge:
-  echo 'merged feature to main' > post-merge-ran.txt
-
+  echo 'merged feature to main' > post-merge-ran.txt
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_runs_from_main_branch.snap b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_runs_from_main_branch.snap
index 23f61ae6b..93751d129 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_runs_from_main_branch.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_runs_from_main_branch.snap
@@ -26,5 +26,4 @@ exit_code: 0
⚪ Already up to date with main (no new commits, no rebase needed)
⚪ Worktree preserved (main worktree)
🔄 Running project post-merge:
-  echo 'post-merge ran from main' > post-merge-ran.txt
-
+  echo 'post-merge ran from main' > post-merge-ran.txt
diff --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.snap
index 76bec14fb..9e60a3910 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
@@ -27,5 +27,4 @@ exit_code: 0
⚪ Already up to date with main (no new commits, no rebase needed)
🔄 Removing feature worktree & branch in background (already in main)
🔄 Running project post-merge:
-  echo 'post-merge ran' > post-merge-ran.txt
-
+  echo 'post-merge ran' > post-merge-ran.txt
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_commit_command_failure.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_commit_command_failure.snap
index 1ee8acd64..8b31283af 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_commit_command_failure.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_commit_command_failure.snap
@@ -27,7 +27,7 @@ exit_code: 1
🟡 Auto-staging 1 untracked path:
  feature.txt
🔄 Running project pre-commit:
-  exit 1
+  exit 1
❌ pre-commit command failed: exit status: 1
💡 Use --no-verify to skip pre-commit commands
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_commit_command_success.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_commit_command_success.snap
index bef897325..75634a633 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_commit_command_success.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_commit_command_success.snap
@@ -27,7 +27,7 @@ exit_code: 0
🟡 Auto-staging 1 untracked path:
  feature.txt
🔄 Running project pre-commit:
-  echo 'Pre-commit check passed'
+  echo 'Pre-commit check passed'
Pre-commit check passed
🔄 Committing changes with default message... (1 file, +1, no squashing needed)
💡 Using fallback commit message. Run wt config --help for LLM setup guide
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 65893bb63..ff313430d 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
@@ -25,7 +25,7 @@ exit_code: 1
----- stderr -----
🔄 Running project pre-merge:
-  exit 1
+  exit 1
❌ pre-merge command failed: exit status: 1
💡 Use --no-verify to skip pre-merge commands
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 79bda620c..7a1989874 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
@@ -25,11 +25,11 @@ exit_code: 0
----- stderr -----
🔄 Running project pre-merge format:
-  exit 0
+  exit 0
🔄 Running project pre-merge lint:
-  exit 0
+  exit 0
🔄 Running project pre-merge test:
-  exit 0
+  exit 0
🔄 Merging 1 commit to main @ 2cbe2a2 (no commit/squash/rebase needed)
  * 2cbe2a2 Add feature file
  feature.txt | 1 +
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 f89154d82..532606197 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
@@ -25,7 +25,7 @@ exit_code: 0
----- stderr -----
🔄 Running project pre-merge:
-  exit 0
+  exit 0
🔄 Merging 1 commit to main @ 4b1199c (no commit/squash/rebase needed)
  * 4b1199c Add feature file
  feature.txt | 1 +
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 4d40320b4..c1a54c517 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
@@ -25,7 +25,7 @@ exit_code: 1
----- stderr -----
🔄 Running project pre-commit:
-  exit 1
+  exit 1
❌ pre-commit command failed: exit status: 1
💡 Use --no-verify to skip pre-commit commands
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 08ab7db8e..83c0afc4a 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
@@ -25,7 +25,7 @@ exit_code: 0
----- stderr -----
🔄 Running project pre-commit:
-  echo 'Pre-commit check passed'
+  echo 'Pre-commit check passed'
Pre-commit check passed
🔄 Merging 1 commit to main @ 726717f (no commit/squash/rebase needed)
  * 726717f Add feature file
diff --git a/tests/snapshots/integration__integration_tests__merge__readme_example_complex.snap b/tests/snapshots/integration__integration_tests__merge__readme_example_complex.snap
index 41cb9db31..3e6097728 100644
--- a/tests/snapshots/integration__integration_tests__merge__readme_example_complex.snap
+++ b/tests/snapshots/integration__integration_tests__merge__readme_example_complex.snap
@@ -38,7 +38,7 @@ exit_code: 0
  - Create test suite covering all authentication flows
✅ Squashed @ 95c3316
🔄 Running project pre-merge test:
-  cargo test
+  cargo test
 Finished test [unoptimized + debuginfo] target(s) in 0.12s
Running unittests src/lib.rs (target/debug/deps/worktrunk-abc123)
@@ -50,7 +50,7 @@ test auth::tests::test_token_validation ... ok
test result: ok. 18 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.08s
🔄 Running project pre-merge lint:
-  cargo clippy
+  cargo clippy
 Checking worktrunk v0.1.0
Finished dev [unoptimized + debuginfo] target(s) in 1.23s
🔄 Merging 1 commit to main @ 95c3316 (no rebase needed)
@@ -62,7 +62,7 @@ test result: ok. 18 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; fin
✅ Merged to main (1 commit, 3 files, +33)
🔄 Removing feature-auth worktree & branch in background (already in main)
🔄 Running project post-merge install:
-  cargo install --path .
+  cargo install --path .
 Installing worktrunk v0.1.0
Compiling worktrunk v0.1.0
Finished release [optimized] target(s) in 2.34s
diff --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.snap
index 22a1ac25b..928991ee9 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
@@ -27,11 +27,11 @@ exit_code: 0
----- stderr -----
🔄 Running project post-create install:
-  uv sync
-
+  uv sync
+
Resolved 24 packages in 145ms
Installed 24 packages in 1.2s
✅ Created new worktree for feature-x from main at [REPO].feature-x
💡 Run wt config shell install to enable automatic cd
🔄 Running project post-start dev:
-  uv run dev
+  uv run dev
diff --git a/tests/snapshots/integration__integration_tests__merge__readme_example_hooks_pre_merge.snap b/tests/snapshots/integration__integration_tests__merge__readme_example_hooks_pre_merge.snap
index 7014ec5d7..dee09da6d 100644
--- a/tests/snapshots/integration__integration_tests__merge__readme_example_hooks_pre_merge.snap
+++ b/tests/snapshots/integration__integration_tests__merge__readme_example_hooks_pre_merge.snap
@@ -33,8 +33,8 @@ exit_code: 0
  Includes comprehensive test coverage and input validation.
✅ Squashed @ 69200cc
🔄 Running project pre-merge test:
-  uv run pytest
-
+  uv run pytest
+
============================= test session starts ==============================
collected 3 items
@@ -45,8 +45,8 @@ tests/test_auth.py::test_token_validation PASSED [100%]
============================== 3 passed in 0.8s ===============================
🔄 Running project pre-merge lint:
-  uv run ruff check
-
+  uv run ruff check
+
All checks passed!
🔄 Merging 1 commit to main @ 69200cc (no rebase needed)
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 089a58b4a..cd8aff18d 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
@@ -18,6 +18,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
---
success: true
@@ -26,8 +27,8 @@ exit_code: 0
----- stderr -----
🔄 Running project post-create:
-  echo 'Setup done' > setup.txt
+  echo 'Setup done' > setup.txt
✅ Created new worktree for feature from main at [REPO].feature
💡 Run wt config shell install to enable automatic cd
🔄 Running project post-start server:
-  sleep 0.05 && echo 'Server running' > server.txt
+  sleep 0.05 && echo 'Server running' > server.txt
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 1d6881366..d6f91413b 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
@@ -20,6 +20,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
---
success: true
@@ -29,6 +30,6 @@ exit_code: 0
----- stderr -----
✅ Created new worktree for feature from main at [REPO].feature
🔄 Running project post-start:
-  echo 'Background task' > background.txt
+  echo 'Background task' > background.txt
🔄 Executing (--execute):
-  echo 'Execute flag' > execute.txt
+  echo 'Execute flag' > execute.txt
diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_default_branch_template.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_default_branch_template.snap
index 5d1e60415..7c013a5e4 100644
--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_default_branch_template.snap
+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_default_branch_template.snap
@@ -19,6 +19,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
---
success: true
@@ -27,6 +28,6 @@ exit_code: 0
----- stderr -----
🔄 Running project post-create:
-  echo 'Default: main' > default.txt
+  echo 'Default: main' > default.txt
✅ Created new worktree for feature from main at [REPO].feature
💡 Run wt config shell install to enable automatic cd
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 19314f969..a248eddfa 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
@@ -18,6 +18,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
---
success: true
@@ -26,7 +27,7 @@ exit_code: 0
----- stderr -----
🔄 Running project post-create:
-  exit 1
+  exit 1
🟡 Command failed: exit status: 1
✅ Created new worktree for feature from main at [REPO].feature
💡 Run wt config shell install to enable automatic cd
diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_git_variables_template.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_git_variables_template.snap
index 70ab9cd99..21d4c3446 100644
--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_git_variables_template.snap
+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_git_variables_template.snap
@@ -19,6 +19,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
---
success: true
@@ -27,12 +28,12 @@ exit_code: 0
----- stderr -----
🔄 Running project post-create commit:
-  echo 'Commit: d5f94f04f2d59bd7282f575b929b659aefa65f2e' > git_vars.txt
+  echo 'Commit: d5f94f04f2d59bd7282f575b929b659aefa65f2e' > git_vars.txt
🔄 Running project post-create short:
-  echo 'Short: d5f94f0' >> git_vars.txt
+  echo 'Short: d5f94f0' >> git_vars.txt
🔄 Running project post-create remote:
-  echo 'Remote: origin' >> git_vars.txt
+  echo 'Remote: origin' >> git_vars.txt
🔄 Running project post-create worktree_name:
-  echo 'Worktree Name: repo.feature' >> git_vars.txt
+  echo 'Worktree Name: repo.feature' >> git_vars.txt
✅ Created new worktree for feature from main at [REPO].feature
💡 Run wt config shell install to enable automatic cd
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 11ad93f86..49812c37a 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
@@ -18,6 +18,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
---
success: true
@@ -26,10 +27,10 @@ exit_code: 0
----- stderr -----
🔄 Running project 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 from main at [REPO].feature
💡 Run wt config shell install to enable automatic cd
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 e590dd388..6607debbd 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
@@ -18,6 +18,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
---
success: true
@@ -26,10 +27,10 @@ exit_code: 0
----- stderr -----
🔄 Running project post-create install:
-  echo 'Installing deps'
+  echo 'Installing deps'
Installing deps
🔄 Running project post-create setup:
-  echo 'Running setup'
+  echo 'Running setup'
Running setup
✅ Created new worktree for feature from main at [REPO].feature
💡 Run wt config shell install to enable automatic cd
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 fe6715d21..57ba53111 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
@@ -18,6 +18,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
---
success: true
@@ -26,7 +27,7 @@ exit_code: 0
----- stderr -----
🔄 Running project post-create:
-  echo 'Setup complete'
+  echo 'Setup complete'
Setup complete
✅ Created new worktree for feature from main at [REPO].feature
💡 Run wt config shell install to enable automatic cd
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 e12ba2585..63ab4e466 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
@@ -18,6 +18,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
---
success: true
@@ -26,12 +27,12 @@ exit_code: 0
----- stderr -----
🔄 Running project post-create repo:
-  echo 'Repo: repo' > info.txt
+  echo 'Repo: repo' > info.txt
🔄 Running project post-create branch:
-  echo 'Branch: feature-test' >> info.txt
+  echo 'Branch: feature-test' >> info.txt
🔄 Running project post-create worktree:
-  echo 'Worktree: [REPO].feature-test' >> info.txt
+  echo 'Worktree: [REPO].feature-test' >> info.txt
🔄 Running project post-create root:
-  echo 'Root: [REPO]' >> info.txt
+  echo 'Root: [REPO]' >> info.txt
✅ Created new worktree for feature/test from main at [REPO].feature-test
💡 Run wt config shell install to enable automatic cd
diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_upstream_template.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_upstream_template.snap
index 07c2e64c5..48efaacfb 100644
--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_upstream_template.snap
+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_upstream_template.snap
@@ -19,6 +19,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
---
success: true
@@ -27,6 +28,6 @@ exit_code: 0
----- stderr -----
🔄 Running project post-create:
-  echo 'Upstream: ' > upstream.txt
+  echo 'Upstream: ' > upstream.txt
✅ Created new worktree for feature from main at [REPO].feature
💡 Run wt config shell install to enable automatic cd
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 c227c8b39..2a5cc04ab 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
@@ -18,6 +18,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
---
success: true
@@ -28,6 +29,6 @@ exit_code: 0
✅ Created new worktree for feature from main at [REPO].feature
💡 Run wt config shell install to enable automatic cd
🔄 Running project post-start:
-  echo 'line1
-  line2
-  line3' | grep line2 > filtered.txt
+  echo 'line1
+  line2
+  line3' | grep line2 > filtered.txt
diff --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.snap
index 2605f479e..ede735be5 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
@@ -18,6 +18,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
---
success: true
@@ -28,4 +29,4 @@ exit_code: 0
✅ Created new worktree for feature from main at [REPO].feature
💡 Run wt config shell install to enable automatic cd
🔄 Running project post-start:
-  echo 'POST-START-RAN' > post_start_marker.txt
+  echo 'POST-START-RAN' > post_start_marker.txt
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 0f9c062da..afdaec908 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
@@ -18,6 +18,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
---
success: true
@@ -28,4 +29,4 @@ exit_code: 0
✅ Created new worktree for feature from main at [REPO].feature
💡 Run wt config shell install to enable automatic cd
🔄 Running project post-start:
-  echo 'unclosed quote
+  echo 'unclosed quote
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 c9179b09f..ff922d1dd 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
@@ -18,6 +18,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
---
success: true
@@ -28,4 +29,4 @@ exit_code: 0
✅ Created new worktree for feature from main at [REPO].feature
💡 Run wt config shell install to enable automatic cd
🔄 Running project post-start:
-  echo 'stdout output' && echo 'stderr output' >&2
+  echo 'stdout output' && echo 'stderr output' >&2
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 19f49b94c..346e60f75 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
@@ -18,6 +18,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
---
success: true
@@ -28,6 +29,6 @@ exit_code: 0
✅ Created new worktree for feature from main at [REPO].feature
💡 Run wt config shell install to enable automatic cd
🔄 Running project 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
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 b4621efef..ccf6d4624 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
@@ -18,6 +18,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
---
success: true
@@ -28,6 +29,6 @@ exit_code: 0
✅ Created new worktree for feature from main at [REPO].feature
💡 Run wt config shell install to enable automatic cd
🔄 Running project post-start task1:
-  echo 'Task 1 running' > task1.txt
+  echo 'Task 1 running' > task1.txt
🔄 Running project post-start task2:
-  echo 'Task 2 running' > task2.txt
+  echo 'Task 2 running' > task2.txt
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 6dd76b88e..ff09fe59e 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
@@ -18,6 +18,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
---
success: true
@@ -28,8 +29,8 @@ exit_code: 0
✅ Created new worktree for feature from main at [REPO].feature
💡 Run wt config shell install to enable automatic cd
🔄 Running project post-start task1:
-  echo 'TASK1_OUTPUT'
+  echo 'TASK1_OUTPUT'
🔄 Running project post-start task2:
-  echo 'TASK2_OUTPUT'
+  echo 'TASK2_OUTPUT'
🔄 Running project post-start task3:
-  echo 'TASK3_OUTPUT'
+  echo 'TASK3_OUTPUT'
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 fccdcfbe6..cc86c3172 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
@@ -18,6 +18,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
---
success: true
@@ -28,4 +29,4 @@ exit_code: 0
✅ Created new worktree for feature from main at [REPO].feature
💡 Run wt config shell install to enable automatic cd
🔄 Running project post-start:
-  sleep 0.1 && echo 'Background task done' > background.txt
+  sleep 0.1 && echo 'Background task done' > background.txt
diff --git a/tests/snapshots/integration__integration_tests__remove__pre_remove_hook_executes.snap b/tests/snapshots/integration__integration_tests__remove__pre_remove_hook_executes.snap
index c53f918db..e6d8cd485 100644
--- a/tests/snapshots/integration__integration_tests__remove__pre_remove_hook_executes.snap
+++ b/tests/snapshots/integration__integration_tests__remove__pre_remove_hook_executes.snap
@@ -26,6 +26,6 @@ exit_code: 0
----- stderr -----
🔄 Removing worktree for feature-hook...
🔄 Running project pre-remove:
-  echo 'About to remove worktree'
+  echo 'About to remove worktree'
About to remove worktree
✅ Removed feature-hook worktree & branch (already in main)
diff --git a/tests/snapshots/integration__integration_tests__remove__pre_remove_hook_failure_aborts.snap b/tests/snapshots/integration__integration_tests__remove__pre_remove_hook_failure_aborts.snap
index c7dd8d39d..964eeee90 100644
--- a/tests/snapshots/integration__integration_tests__remove__pre_remove_hook_failure_aborts.snap
+++ b/tests/snapshots/integration__integration_tests__remove__pre_remove_hook_failure_aborts.snap
@@ -26,7 +26,7 @@ exit_code: 1
----- stderr -----
🔄 Removing worktree for feature-fail...
🔄 Running project pre-remove:
-  exit 1
+  exit 1
❌ pre-remove command failed: exit status: 1
💡 Use --no-verify to skip pre-remove commands
diff --git a/tests/snapshots/integration__integration_tests__remove__pre_remove_hook_runs_for_detached_head.snap b/tests/snapshots/integration__integration_tests__remove__pre_remove_hook_runs_for_detached_head.snap
index 23cb4aaf5..5b3bebd10 100644
--- a/tests/snapshots/integration__integration_tests__remove__pre_remove_hook_runs_for_detached_head.snap
+++ b/tests/snapshots/integration__integration_tests__remove__pre_remove_hook_runs_for_detached_head.snap
@@ -25,5 +25,5 @@ exit_code: 0
----- stderr -----
🔄 Removing current worktree...
🔄 Running project pre-remove:
-  touch [REPO]/m.txt
+  touch [REPO]/m.txt
✅ Removed worktree (detached HEAD, no branch to delete)
diff --git a/tests/snapshots/integration__integration_tests__remove__pre_remove_hook_runs_for_detached_head_background.snap b/tests/snapshots/integration__integration_tests__remove__pre_remove_hook_runs_for_detached_head_background.snap
index a13365124..11962518c 100644
--- a/tests/snapshots/integration__integration_tests__remove__pre_remove_hook_runs_for_detached_head_background.snap
+++ b/tests/snapshots/integration__integration_tests__remove__pre_remove_hook_runs_for_detached_head_background.snap
@@ -23,5 +23,5 @@ exit_code: 0
----- stderr -----
🔄 Running project pre-remove:
-  touch [REPO]/detached-bg-hook-marker.txt
+  touch [REPO]/detached-bg-hook-marker.txt
🔄 Removing worktree in background (detached HEAD, no branch to delete)
diff --git a/tests/snapshots/integration__integration_tests__remove__pre_remove_hook_template_variables.snap b/tests/snapshots/integration__integration_tests__remove__pre_remove_hook_template_variables.snap
index aeff9472b..0cb86ae5e 100644
--- a/tests/snapshots/integration__integration_tests__remove__pre_remove_hook_template_variables.snap
+++ b/tests/snapshots/integration__integration_tests__remove__pre_remove_hook_template_variables.snap
@@ -26,12 +26,12 @@ exit_code: 0
----- stderr -----
🔄 Removing worktree for feature-templates...
🔄 Running project pre-remove branch:
-  echo 'Branch: feature-templates'
+  echo 'Branch: feature-templates'
Branch: feature-templates
🔄 Running project pre-remove worktree:
-  echo 'Worktree: [REPO].feature-templates'
+  echo 'Worktree: [REPO].feature-templates'
Worktree: [REPO].feature-templates
🔄 Running project pre-remove worktree_name:
-  echo 'Name: repo.feature-templates'
+  echo 'Name: repo.feature-templates'
Name: repo.feature-templates
✅ Removed feature-templates worktree & branch (already in main)
diff --git a/tests/snapshots/integration__integration_tests__remove__remove_internal_mode.snap b/tests/snapshots/integration__integration_tests__remove__remove_internal_mode.snap
index b991b395a..ff0feba52 100644
--- a/tests/snapshots/integration__integration_tests__remove__remove_internal_mode.snap
+++ b/tests/snapshots/integration__integration_tests__remove__remove_internal_mode.snap
@@ -25,4 +25,3 @@ cd '[REPO]'
----- stderr -----
🔄 Removing feature-internal worktree & branch in background (already in main)
-
diff --git a/tests/snapshots/integration__integration_tests__security__commit_message_with_directive_not_executed.snap b/tests/snapshots/integration__integration_tests__security__commit_message_with_directive_not_executed.snap
index 7a1f4c6d4..26372a8fd 100644
--- a/tests/snapshots/integration__integration_tests__security__commit_message_with_directive_not_executed.snap
+++ b/tests/snapshots/integration__integration_tests__security__commit_message_with_directive_not_executed.snap
@@ -22,8 +22,8 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ main ^ ./repo f9d58892 1d Fix bug __WORKTRUNK_EXEC__echo PWNED > /tmp/hacked4
-+ feature _ ./repo.feature f9d58892 1d Fix bug __WORKTRUNK_EXEC__echo PWNED > /tmp/hacked4
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ main ^ ./repo f9d58892 1d Fix bug __WORKTRUNK_EXEC__echo PWNED > /tmp/hacked4
++ feature _ ./repo.feature f9d58892 1d Fix bug __WORKTRUNK_EXEC__echo PWNED > /tmp/hacked4
-⚪ Showing 2 worktrees
+⚪ Showing 2 worktrees
diff --git a/tests/snapshots/integration__integration_tests__security__path_with_directive_not_executed.snap b/tests/snapshots/integration__integration_tests__security__path_with_directive_not_executed.snap
index 465616d12..e36a1b9eb 100644
--- a/tests/snapshots/integration__integration_tests__security__path_with_directive_not_executed.snap
+++ b/tests/snapshots/integration__integration_tests__security__path_with_directive_not_executed.snap
@@ -22,7 +22,7 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ main ^ . b834638e 1d Initial commit
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ main ^ . b834638e 1d Initial commit
-⚪ Showing 1 worktree
+⚪ Showing 1 worktree
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_empty_diffs.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_empty_diffs.snap
index d3d27abb6..27ef82ad9 100644
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_empty_diffs.snap
+++ b/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_empty_diffs.snap
@@ -22,10 +22,10 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ main ^ ./repo b834638e 1d Initial commit
-+ also-no-changes _ ./repo.also-no-changes b834638e 1d Initial commit
-+ no-changes _ ./repo.no-changes b834638e 1d Initial commit
-+ with-changes ! +1 -1 ./repo.with-changes b834638e 1d Initial commit
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ main ^ ./repo b834638e 1d Initial commit
++ also-no-changes _ ./repo.also-no-changes b834638e 1d Initial commit
++ no-changes _ ./repo.no-changes b834638e 1d Initial commit
++ with-changes ! +1 -1 ./repo.with-changes b834638e 1d Initial commit
-⚪ Showing 4 worktrees, 1 with changes
+⚪ Showing 4 worktrees, 1 with changes
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_extreme_diffs.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_extreme_diffs.snap
index a086c489a..b89f6ddf4 100644
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_extreme_diffs.snap
+++ b/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_extreme_diffs.snap
@@ -22,9 +22,9 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ main ^ ./repo b834638e 1d Initial commit
-+ huge ? _ ./repo.huge b834638e 1d Initial commit
-+ tiny ! +1 -1 ./repo.tiny b834638e 1d Initial commit
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ main ^ ./repo b834638e 1d Initial commit
++ huge ? _ ./repo.huge b834638e 1d Initial commit
++ tiny ! +1 -1 ./repo.tiny b834638e 1d Initial commit
-⚪ Showing 3 worktrees, 1 with changes
+⚪ Showing 3 worktrees, 1 with changes
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_varying_diffs.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_varying_diffs.snap
index 60dabebb4..c59af0b86 100644
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_varying_diffs.snap
+++ b/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_varying_diffs.snap
@@ -22,10 +22,10 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ main ^ ./repo b834638e 1d Initial commit
-+ feature-large ? _ ./repo.feature-large b834638e 1d Initial commit
-+ feature-medium ? _ ./repo.feature-medium b834638e 1d Initial commit
-+ feature-small ? _ ./repo.feature-small b834638e 1d Initial commit
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ main ^ ./repo b834638e 1d Initial commit
++ feature-large ? _ ./repo.feature-large b834638e 1d Initial commit
++ feature-medium ? _ ./repo.feature-medium b834638e 1d Initial commit
++ feature-small ? _ ./repo.feature-small b834638e 1d Initial commit
-⚪ Showing 4 worktrees
+⚪ Showing 4 worktrees
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__long_branch_names.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__long_branch_names.snap
index f089ebfbc..dbeb85310 100644
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__long_branch_names.snap
+++ b/tests/snapshots/integration__integration_tests__spacing_edge_cases__long_branch_names.snap
@@ -22,10 +22,10 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age
-@ main ^ ./repo b834638e 1d
-+ another-extremely-long-name-here _ ./repo.another-extremely-long-name-here b834638e 1d
-+ short _ ./repo.short b834638e 1d
-+ very-long-feature-branch-name _ ./repo.very-long-feature-branch-name b834638e 1d
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age
+@ main ^ ./repo b834638e 1d
++ another-extremely-long-name-here _ ./repo.another-extremely-long-name-here b834638e 1d
++ short _ ./repo.short b834638e 1d
++ very-long-feature-branch-name _ ./repo.very-long-feature-branch-name b834638e 1d
-⚪ Showing 4 worktrees, 1 column hidden
+⚪ Showing 4 worktrees, 1 column hidden
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__mixed_length_branch_names.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__mixed_length_branch_names.snap
index d4963c24e..2f1bb9aa7 100644
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__mixed_length_branch_names.snap
+++ b/tests/snapshots/integration__integration_tests__spacing_edge_cases__mixed_length_branch_names.snap
@@ -22,10 +22,10 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Remote⇅ Commit Age Message
-@ main ^ b834638e 1d Initial commit
-+ extremely-long-branch-name-that-might-cause-layout-issues _ b834638e 1d Initial commit
-+ medium _ b834638e 1d Initial commit
-+ x _ b834638e 1d Initial commit
+ Branch Status HEAD± main↕ Remote⇅ Commit Age Message
+@ main ^ b834638e 1d Initial commit
++ extremely-long-branch-name-that-might-cause-layout-issues _ b834638e 1d Initial commit
++ medium _ b834638e 1d Initial commit
++ x _ b834638e 1d Initial commit
-⚪ Showing 4 worktrees, 1 column hidden
+⚪ Showing 4 worktrees, 1 column hidden
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__short_branch_names.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__short_branch_names.snap
index ea7dca386..c107a4001 100644
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__short_branch_names.snap
+++ b/tests/snapshots/integration__integration_tests__spacing_edge_cases__short_branch_names.snap
@@ -22,10 +22,10 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ main ^ ./repo b834638e 1d Initial commit
-+ a _ ./repo.a b834638e 1d Initial commit
-+ bb _ ./repo.bb b834638e 1d Initial commit
-+ ccc _ ./repo.ccc b834638e 1d Initial commit
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ main ^ ./repo b834638e 1d Initial commit
++ a _ ./repo.a b834638e 1d Initial commit
++ bb _ ./repo.bb b834638e 1d Initial commit
++ ccc _ ./repo.ccc b834638e 1d Initial commit
-⚪ Showing 4 worktrees
+⚪ Showing 4 worktrees
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__unicode_branch_names.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__unicode_branch_names.snap
index 48e8bc996..40182cf32 100644
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__unicode_branch_names.snap
+++ b/tests/snapshots/integration__integration_tests__spacing_edge_cases__unicode_branch_names.snap
@@ -22,10 +22,10 @@ exit_code: 0
----- stdout -----
----- stderr -----
- Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ main ^ ./repo b834638e 1d Initial commit
-+ cafe _ ./repo.cafe b834638e 1d Initial commit
-+ naive _ ./repo.naive b834638e 1d Initial commit
-+ resume _ ./repo.resume b834638e 1d Initial commit
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ main ^ ./repo b834638e 1d Initial commit
++ cafe _ ./repo.cafe b834638e 1d Initial commit
++ naive _ ./repo.naive b834638e 1d Initial commit
++ resume _ ./repo.resume b834638e 1d Initial commit
-⚪ Showing 4 worktrees
+⚪ Showing 4 worktrees
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 3f68a1078..fb54913e8 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
@@ -20,6 +20,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
---
success: true
@@ -29,4 +30,4 @@ exit_code: 0
----- stderr -----
✅ Created new worktree for file-test from main at [REPO].file-test
🔄 Executing (--execute):
-  echo 'test content' > test.txt
+  echo 'test content' > test.txt
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 e272f071e..3d0b30c01 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_execute_existing.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_execute_existing.snap
@@ -19,6 +19,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
---
success: true
@@ -28,4 +29,4 @@ exit_code: 0
----- stderr -----
✅ Switched to worktree for existing-exec at [REPO].existing-exec
🔄 Executing (--execute):
-  echo 'existing worktree' > existing.txt
+  echo 'existing worktree' > existing.txt
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 5099aacde..719f4150d 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_execute_failure.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_execute_failure.snap
@@ -20,6 +20,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
---
success: false
@@ -29,4 +30,4 @@ exit_code: 1
----- stderr -----
✅ Created new worktree for fail-test from main at [REPO].fail-test
🔄 Executing (--execute):
-  exit 1
+  exit 1
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 4a1224581..c4c1aca0e 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_execute_multiline.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_execute_multiline.snap
@@ -20,6 +20,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
---
success: true
@@ -32,6 +33,6 @@ line3
----- stderr -----
✅ Created new worktree for multiline-test from main at [REPO].multiline-test
🔄 Executing (--execute):
-  echo 'line1'
-  echo 'line2'
-  echo 'line3'
+  echo 'line1'
+  echo 'line2'
+  echo 'line3'
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 eb08b12db..3cbcdd33c 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_execute_success.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_execute_success.snap
@@ -20,6 +20,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
---
success: true
@@ -30,4 +31,4 @@ test output
----- stderr -----
✅ Created new worktree for exec-test from main at [REPO].exec-test
🔄 Executing (--execute):
-  echo 'test output'
+  echo 'test output'
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_existing_internal.snap b/tests/snapshots/integration__integration_tests__switch__switch_existing_internal.snap
index d82ee2f8d..bc07e9d2b 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_existing_internal.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_existing_internal.snap
@@ -18,6 +18,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
---
success: true
@@ -27,4 +28,3 @@ cd '[REPO].existing-wt'
----- stderr -----
✅ Switched to worktree for existing-wt at [REPO].existing-wt
-
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_internal_execute_exit_code.snap b/tests/snapshots/integration__integration_tests__switch__switch_internal_execute_exit_code.snap
index 6a1960943..e880149c6 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_internal_execute_exit_code.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_internal_execute_exit_code.snap
@@ -21,6 +21,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
---
success: true
@@ -32,5 +33,4 @@ exit 42
----- stderr -----
✅ Created new worktree for exit-code-test from main at [REPO].exit-code-test
🔄 Executing (--execute):
-  exit 42
-
+  exit 42
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_internal_execute_output_then_exit.snap b/tests/snapshots/integration__integration_tests__switch__switch_internal_execute_output_then_exit.snap
index ffe1a910d..711193aa8 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_internal_execute_output_then_exit.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_internal_execute_output_then_exit.snap
@@ -21,6 +21,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
---
success: true
@@ -33,6 +34,5 @@ exit 7
----- stderr -----
✅ Created new worktree for output-exit-test from main at [REPO].output-exit-test
🔄 Executing (--execute):
-  echo 'doing work'
-  exit 7
-
+  echo 'doing work'
+  exit 7
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_internal_mode.snap b/tests/snapshots/integration__integration_tests__switch__switch_internal_mode.snap
index 1b2084dbd..455b00b0c 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_internal_mode.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_internal_mode.snap
@@ -19,6 +19,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
---
success: true
@@ -28,4 +29,3 @@ cd '[REPO].internal-test'
----- stderr -----
✅ Created new worktree for internal-test from main at [REPO].internal-test
-
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 89ac2b9bc..741a11bbe 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_internal_with_execute.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_internal_with_execute.snap
@@ -21,6 +21,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
---
success: true
@@ -33,6 +34,5 @@ echo 'line2'
----- stderr -----
✅ Created new worktree for exec-internal from main at [REPO].exec-internal
🔄 Executing (--execute):
-  echo 'line1'
-  echo 'line2'
-
+  echo 'line1'
+  echo 'line2'
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_missing_argument_hints.snap b/tests/snapshots/integration__integration_tests__switch__switch_missing_argument_hints.snap
index d45667756..c13dd9dc8 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_missing_argument_hints.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_missing_argument_hints.snap
@@ -16,6 +16,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
---
success: false
@@ -24,9 +25,9 @@ exit_code: 2
----- stderr -----
error: the following required arguments were not provided:
- <BRANCH>
+ <BRANCH>
-Usage: wt switch <BRANCH>
+Usage: wt switch <BRANCH>
For more information, try '--help'.
Quick switches:
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 44ce8ba36..6f093c4a8 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
@@ -21,6 +21,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
---
success: true
@@ -31,4 +32,4 @@ execute command runs
----- stderr -----
✅ Created new worktree for no-hooks-test from main at [REPO].no-hooks-test
🔄 Executing (--execute):
-  echo 'execute command runs'
+  echo '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 aafa41bcf..625673e71 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
@@ -20,6 +20,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
---
success: true
@@ -30,4 +31,4 @@ execute still runs
----- stderr -----
✅ Switched to worktree for existing-no-hooks at [REPO].existing-no-hooks
🔄 Executing (--execute):
-  echo 'execute still runs'
+  echo 'execute still runs'
diff --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.snap
index c4e2e8445..094c55fcd 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
@@ -27,6 +27,6 @@ exit_code: 0
✅ Created new worktree for feature from main at [REPO].feature
💡 Run wt config shell install to enable automatic cd
🔄 Running user post-start bg:
-  echo 'USER_POST_START' > user_bg.txt
+  echo 'USER_POST_START' > user_bg.txt
🔄 Running project post-start:
-  echo 'PROJECT_POST_START' > project_bg.txt
+  echo 'PROJECT_POST_START' > project_bg.txt
diff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_hook_template_vars.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_hook_template_vars.snap
index e946d6e05..c636fa50f 100644
--- a/tests/snapshots/integration__integration_tests__user_hooks__user_hook_template_vars.snap
+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_hook_template_vars.snap
@@ -25,6 +25,6 @@ exit_code: 0
----- stderr -----
🔄 Running user post-create vars:
-  echo 'repo=repo branch=feature' > template_vars.txt
+  echo 'repo=repo branch=feature' > template_vars.txt
✅ Created new worktree for feature from main at [REPO].feature
💡 Run wt config shell install to enable automatic cd
diff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_hooks_before_project.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_hooks_before_project.snap
index cc549c2dc..188909f58 100644
--- a/tests/snapshots/integration__integration_tests__user_hooks__user_hooks_before_project.snap
+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_hooks_before_project.snap
@@ -25,8 +25,8 @@ exit_code: 0
----- stderr -----
🔄 Running user post-create log:
-  echo 'USER_HOOK' >> hook_order.txt
+  echo 'USER_HOOK' >> hook_order.txt
🔄 Running project post-create:
-  echo 'PROJECT_HOOK' >> hook_order.txt
+  echo 'PROJECT_HOOK' >> hook_order.txt
✅ Created new worktree for feature from main at [REPO].feature
💡 Run wt config shell install to enable automatic cd
diff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_hooks_no_approval.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_hooks_no_approval.snap
index b89a93598..6387d2978 100644
--- a/tests/snapshots/integration__integration_tests__user_hooks__user_hooks_no_approval.snap
+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_hooks_no_approval.snap
@@ -25,6 +25,6 @@ exit_code: 0
----- stderr -----
🔄 Running user post-create setup:
-  echo 'NO_APPROVAL_NEEDED' > no_approval.txt
+  echo 'NO_APPROVAL_NEEDED' > no_approval.txt
✅ Created new worktree for feature from main at [REPO].feature
💡 Run wt config shell install to enable automatic cd
diff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_post_create_executes.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_post_create_executes.snap
index 3051bd14d..4d66babdc 100644
--- a/tests/snapshots/integration__integration_tests__user_hooks__user_post_create_executes.snap
+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_post_create_executes.snap
@@ -25,6 +25,6 @@ exit_code: 0
----- stderr -----
🔄 Running user post-create log:
-  echo 'USER_POST_CREATE_RAN' > user_hook_marker.txt
+  echo 'USER_POST_CREATE_RAN' > user_hook_marker.txt
✅ Created new worktree for feature from main at [REPO].feature
💡 Run wt config shell install to enable automatic cd
diff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_post_create_failure.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_post_create_failure.snap
index f9f4bc3d3..c09454092 100644
--- a/tests/snapshots/integration__integration_tests__user_hooks__user_post_create_failure.snap
+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_post_create_failure.snap
@@ -25,7 +25,7 @@ exit_code: 0
----- stderr -----
🔄 Running user post-create failing:
-  exit 1
+  exit 1
🟡 Command failing failed: exit status: 1
✅ Created new worktree for feature from main at [REPO].feature
💡 Run wt config shell install to enable automatic cd
diff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_post_merge_executes.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_post_merge_executes.snap
index b4de68bd9..bc9f9b0ee 100644
--- a/tests/snapshots/integration__integration_tests__user_hooks__user_post_merge_executes.snap
+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_post_merge_executes.snap
@@ -32,5 +32,4 @@ exit_code: 0
✅ Merged to main (1 commit, 1 file, +1)
⚪ Worktree preserved (--no-remove)
🔄 Running user post-merge notify:
-  echo 'USER_POST_MERGE_RAN' > user_postmerge.txt
-
+  echo 'USER_POST_MERGE_RAN' > user_postmerge.txt
diff --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.snap
index 3609b3de5..3ce19570e 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
@@ -27,4 +27,4 @@ exit_code: 0
✅ Created new worktree for feature from main at [REPO].feature
💡 Run wt config shell install to enable automatic cd
🔄 Running user post-start bg:
-  echo 'USER_POST_START_RAN' > user_bg_marker.txt
+  echo 'USER_POST_START_RAN' > user_bg_marker.txt
diff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_pre_commit_executes.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_pre_commit_executes.snap
index 272ae1de2..120141ff4 100644
--- a/tests/snapshots/integration__integration_tests__user_hooks__user_pre_commit_executes.snap
+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_pre_commit_executes.snap
@@ -28,7 +28,7 @@ exit_code: 0
🟡 Auto-staging 1 untracked path:
  uncommitted.txt
🔄 Running user pre-commit lint:
-  echo 'USER_PRE_COMMIT_RAN' > user_precommit.txt
+  echo 'USER_PRE_COMMIT_RAN' > user_precommit.txt
🔄 Committing changes with default message... (1 file, +1, no squashing needed)
💡 Using fallback commit message. Run wt config --help for LLM setup guide
  Changes to uncommitted.txt
diff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_pre_commit_failure.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_pre_commit_failure.snap
index 343c33b46..15542d588 100644
--- a/tests/snapshots/integration__integration_tests__user_hooks__user_pre_commit_failure.snap
+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_pre_commit_failure.snap
@@ -28,7 +28,7 @@ exit_code: 1
🟡 Auto-staging 1 untracked path:
  uncommitted.txt
🔄 Running user pre-commit lint:
-  exit 1
+  exit 1
❌ pre-commit command failed: lint: exit status: 1
💡 Use --no-verify to skip pre-commit commands
diff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_pre_merge_executes.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_pre_merge_executes.snap
index 9f8519151..4eb021d4b 100644
--- a/tests/snapshots/integration__integration_tests__user_hooks__user_pre_merge_executes.snap
+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_pre_merge_executes.snap
@@ -26,7 +26,7 @@ exit_code: 0
----- stderr -----
🔄 Running user pre-merge check:
-  echo 'USER_PRE_MERGE_RAN' > user_premerge.txt
+  echo 'USER_PRE_MERGE_RAN' > user_premerge.txt
🔄 Merging 1 commit to main @ 66266ec (no commit/squash/rebase needed)
  * 66266ec Add feature
  feature.txt | 1 +
diff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_pre_merge_failure.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_pre_merge_failure.snap
index f353f0c44..8a13016d8 100644
--- a/tests/snapshots/integration__integration_tests__user_hooks__user_pre_merge_failure.snap
+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_pre_merge_failure.snap
@@ -26,7 +26,7 @@ exit_code: 1
----- stderr -----
🔄 Running user pre-merge check:
-  exit 1
+  exit 1
❌ pre-merge command failed: check: exit status: 1
💡 Use --no-verify to skip pre-merge commands
diff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_pre_remove_executes.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_pre_remove_executes.snap
index 8fa80d106..b1a30307d 100644
--- a/tests/snapshots/integration__integration_tests__user_hooks__user_pre_remove_executes.snap
+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_pre_remove_executes.snap
@@ -25,5 +25,5 @@ exit_code: 0
----- stderr -----
🔄 Running user pre-remove cleanup:
-  echo 'USER_PRE_REMOVE_RAN' > /tmp/user_preremove_marker.txt
+  echo 'USER_PRE_REMOVE_RAN' > /tmp/user_preremove_marker.txt
🔄 Removing feature worktree & branch in background (--force-delete)
diff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_pre_remove_failure.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_pre_remove_failure.snap
index 742156210..38ef2fed1 100644
--- a/tests/snapshots/integration__integration_tests__user_hooks__user_pre_remove_failure.snap
+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_pre_remove_failure.snap
@@ -25,7 +25,7 @@ exit_code: 1
----- stderr -----
🔄 Running user pre-remove block:
-  exit 1
+  exit 1
❌ pre-remove command failed: block: exit status: 1
💡 Use --no-verify to skip pre-remove commands