Skip to content

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

refactor: Simplify command approval, status symbol logic, and shorten home directory paths

Maximilian Roos376f97886ae4
diff --git a/src/commands/config.rs b/src/commands/config.rs
index 512a69673..695aa1e81 100644
--- a/src/commands/config.rs
+++ b/src/commands/config.rs
@@ -1,6 +1,7 @@
use etcetera::base_strategy::{BaseStrategy, choose_base_strategy};
use std::path::PathBuf;
use worktrunk::git::{GitError, GitResultExt, Repository};
+use worktrunk::path::format_path_for_display;
use worktrunk::styling::{
AnstyleStyle, CYAN, GREEN, GREEN_BOLD, HINT, HINT_EMOJI, INFO_EMOJI, SUCCESS_EMOJI,
format_toml, print, println,
@@ -20,7 +21,7 @@ pub fn handle_config_init() -> Result<(), GitError> {
let bold = AnstyleStyle::new().bold();
println!(
"{INFO_EMOJI} Global config already exists: {bold}{}{bold:#}",
- config_path.display()
+ format_path_for_display(&config_path)
);
println!();
println!("{HINT_EMOJI} {HINT}Use 'wt config list' to view existing configuration{HINT:#}");
@@ -41,7 +42,7 @@ pub fn handle_config_init() -> Result<(), GitError> {
let green_bold = GREEN.bold();
println!(
"{SUCCESS_EMOJI} {GREEN}Created config file: {green_bold}{}{green_bold:#}",
- config_path.display()
+ format_path_for_display(&config_path)
);
println!();
println!(
@@ -73,7 +74,7 @@ fn display_global_config() -> Result<(), GitError> {
println!(
"{INFO_EMOJI} Global Config: {bold}{}{bold:#}",
- config_path.display()
+ format_path_for_display(&config_path)
);
// Check if file exists
@@ -119,7 +120,7 @@ fn display_project_config() -> Result<(), GitError> {
println!(
"{INFO_EMOJI} Project Config: {bold}{}{bold:#}",
- config_path.display()
+ format_path_for_display(&config_path)
);
// Check if file exists
diff --git a/src/commands/configure_shell.rs b/src/commands/configure_shell.rs
index bede63e8c..c682fef8c 100644
--- a/src/commands/configure_shell.rs
+++ b/src/commands/configure_shell.rs
@@ -1,6 +1,7 @@
use std::fs::{self, OpenOptions};
use std::io::{self, BufRead, BufReader, Write};
use std::path::{Path, PathBuf};
+use worktrunk::path::format_path_for_display;
use worktrunk::shell::Shell;
use worktrunk::styling::{
CYAN_BOLD, INFO_EMOJI, PROGRESS_EMOJI, SUCCESS_EMOJI, format_bash_with_gutter,
@@ -192,7 +193,7 @@ fn configure_shell_file(
if path.exists() {
// Read the file and check if our integration already exists
let file = fs::File::open(path)
- .map_err(|e| format!("Failed to read {}: {}", path.display(), e))?;
+ .map_err(|e| format!("Failed to read {}: {}", format_path_for_display(path), e))?;
let reader = BufReader::new(file);
@@ -222,14 +223,22 @@ fn configure_shell_file(
}
// Append the line with proper spacing
- let mut file = OpenOptions::new()
- .append(true)
- .open(path)
- .map_err(|e| format!("Failed to open {} for writing: {}", path.display(), e))?;
+ let mut file = OpenOptions::new().append(true).open(path).map_err(|e| {
+ format!(
+ "Failed to open {} for writing: {}",
+ format_path_for_display(path),
+ e
+ )
+ })?;
// Add blank line before config, then the config line with its own newline
- write!(file, "\n{}\n", config_content)
- .map_err(|e| format!("Failed to write to {}: {}", path.display(), e))?;
+ write!(file, "\n{}\n", config_content).map_err(|e| {
+ format!(
+ "Failed to write to {}: {}",
+ format_path_for_display(path),
+ e
+ )
+ })?;
Ok(Some(ConfigureResult {
shell,
@@ -258,8 +267,13 @@ fn configure_shell_file(
}
// Write the config content
- fs::write(path, format!("{}\n", config_content))
- .map_err(|e| format!("Failed to write to {}: {}", path.display(), e))?;
+ fs::write(path, format!("{}\n", config_content)).map_err(|e| {
+ format!(
+ "Failed to write to {}: {}",
+ format_path_for_display(path),
+ e
+ )
+ })?;
Ok(Some(ConfigureResult {
shell,
@@ -287,7 +301,7 @@ fn configure_fish_file(
// Check if it already exists and has our integration
if path.exists() {
let existing_content = fs::read_to_string(path)
- .map_err(|e| format!("Failed to read {}: {}", path.display(), e))?;
+ .map_err(|e| format!("Failed to read {}: {}", format_path_for_display(path), e))?;
// Canonical detection: check if the file matches exactly what we write
if existing_content.trim() == content {
@@ -332,8 +346,13 @@ fn configure_fish_file(
}
// Write the conditional wrapper (short one-liner that calls wt init fish | source)
- fs::write(path, format!("{}\n", content))
- .map_err(|e| format!("Failed to write to {}: {}", path.display(), e))?;
+ fs::write(path, format!("{}\n", content)).map_err(|e| {
+ format!(
+ "Failed to write to {}: {}",
+ format_path_for_display(path),
+ e
+ )
+ })?;
Ok(Some(ConfigureResult {
shell,
@@ -367,7 +386,7 @@ fn prompt_for_confirmation(results: &[ConfigureResult]) -> Result<bool, String>
// Format with bold shell and path
let bold = Style::new().bold();
let shell = result.shell;
- let path = result.path.display();
+ let path = format_path_for_display(&result.path);
eprintln!(
"{} {} {bold}{shell}{bold:#} {bold}{path}{bold:#}",
diff --git a/src/commands/list/collect.rs b/src/commands/list/collect.rs
index 7f28c9abb..297032a91 100644
--- a/src/commands/list/collect.rs
+++ b/src/commands/list/collect.rs
@@ -315,8 +315,8 @@ fn drain_cell_updates(
mut on_update: impl FnMut(usize, &mut ListItem, bool, Option<String>),
) {
// Temporary storage for data needed by status_symbols computation
- let mut has_conflicts_map: Vec<bool> = vec![false; worktree_items.len()];
- let mut user_status_map: Vec<Option<String>> = vec![None; worktree_items.len()];
+ let mut has_conflicts_map: Vec<Option<bool>> = vec![None; worktree_items.len()];
+ let mut user_status_map: Vec<Option<Option<String>>> = vec![None; worktree_items.len()];
// Process cell updates as they arrive
while let Ok(update) = rx.recv() {
@@ -354,7 +354,7 @@ fn drain_cell_updates(
has_conflicts,
} => {
// Store temporarily for status_symbols computation
- has_conflicts_map[item_idx] = has_conflicts;
+ has_conflicts_map[item_idx] = Some(has_conflicts);
}
CellUpdate::WorktreeState {
item_idx,
@@ -369,7 +369,7 @@ fn drain_cell_updates(
user_status,
} => {
// Store temporarily for status_symbols computation
- user_status_map[item_idx] = user_status;
+ user_status_map[item_idx] = Some(user_status);
}
CellUpdate::Upstream { item_idx, upstream } => {
worktree_items[item_idx].upstream = Some(upstream);
@@ -384,8 +384,8 @@ fn drain_cell_updates(
}
// Invoke rendering callback (progressive mode re-renders rows, buffered mode does nothing)
- let has_conflicts = has_conflicts_map[item_idx];
- let user_status = user_status_map[item_idx].clone();
+ let has_conflicts = has_conflicts_map[item_idx].unwrap_or(false);
+ let user_status = user_status_map[item_idx].clone().unwrap_or(None);
on_update(
item_idx,
&mut worktree_items[item_idx],
diff --git a/src/commands/list/collect_progressive_impl.rs b/src/commands/list/collect_progressive_impl.rs
index 55b66c705..4e91d8559 100644
--- a/src/commands/list/collect_progressive_impl.rs
+++ b/src/commands/list/collect_progressive_impl.rs
@@ -12,6 +12,7 @@
use crossbeam_channel::Sender;
use std::path::PathBuf;
use worktrunk::git::{LineDiff, Repository, Worktree};
+use worktrunk::path::format_path_for_display;
use super::ci_status::PrStatus;
use super::collect::{CellUpdate, detect_worktree_state};
@@ -237,7 +238,7 @@ fn spawn_upstream<'scope>(
if verbose_errors {
eprintln!(
"Warning: ahead_behind failed for {}: {}",
- path.display(),
+ format_path_for_display(&path),
e
);
}
@@ -250,7 +251,7 @@ fn spawn_upstream<'scope>(
if verbose_errors {
eprintln!(
"Warning: upstream_branch failed for {}: {}",
- path.display(),
+ format_path_for_display(&path),
e
);
}
diff --git a/src/commands/merge.rs b/src/commands/merge.rs
index f932934d4..60d84b689 100644
--- a/src/commands/merge.rs
+++ b/src/commands/merge.rs
@@ -1,6 +1,7 @@
use worktrunk::HookType;
use worktrunk::config::{Command, CommandPhase, ProjectConfig};
use worktrunk::git::{GitError, Repository};
+use worktrunk::path::format_path_for_display;
use worktrunk::styling::{CYAN, ERROR, ERROR_EMOJI, GREEN_BOLD, HINT, HINT_EMOJI};
use super::command_approval::approve_command_batch;
@@ -234,7 +235,7 @@ fn format_merge_summary(primary_path: Option<&std::path::Path>) -> String {
if let Some(path) = primary_path {
format!(
"{GREEN}Returned to primary at {GREEN_BOLD}{}{GREEN_BOLD:#}{GREEN:#}",
- path.display()
+ format_path_for_display(path)
)
} else {
format!("{GREEN}Worktree preserved (--no-remove){GREEN:#}")
diff --git a/src/commands/repository_ext.rs b/src/commands/repository_ext.rs
index a1828dde8..840c89ae9 100644
--- a/src/commands/repository_ext.rs
+++ b/src/commands/repository_ext.rs
@@ -5,6 +5,7 @@ use std::time::{SystemTime, UNIX_EPOCH};
use super::worktree::RemoveResult;
use worktrunk::config::ProjectConfig;
use worktrunk::git::{GitError, GitResultExt, Repository};
+use worktrunk::path::format_path_for_display;
use worktrunk::styling::{
CYAN, CYAN_BOLD, ERROR, ERROR_EMOJI, HINT, HINT_BOLD, HINT_EMOJI, WARNING, WARNING_BOLD,
format_with_gutter,
@@ -55,7 +56,7 @@ impl RepositoryCliExt for Repository {
eprintln!("{ERROR_EMOJI} {ERROR}No project configuration found{ERROR:#}");
eprintln!(
"{HINT_EMOJI} {HINT}Create a config file at: {HINT_BOLD}{}{HINT_BOLD:#}{HINT:#}",
- config_path.display()
+ format_path_for_display(&config_path)
);
Err(GitError::CommandFailed(
"No project configuration found".to_string(),
@@ -167,7 +168,7 @@ impl RepositoryCliExt for Repository {
crate::output::progress(format!(
"{CYAN}Stashing changes in {CYAN_BOLD}{}{CYAN_BOLD:#}{CYAN}...{CYAN:#}",
- wt_path.display()
+ format_path_for_display(wt_path)
))?;
let stash_output =
@@ -258,7 +259,7 @@ impl TargetWorktreeStash {
pub(crate) fn restore(self) -> Result<(), GitError> {
crate::output::progress(format!(
"{CYAN}Restoring stashed changes in {CYAN_BOLD}{}{CYAN_BOLD:#}{CYAN}...{CYAN:#}",
- self.path.display()
+ format_path_for_display(&self.path)
))?;
if let Err(_e) = self
@@ -268,7 +269,7 @@ impl TargetWorktreeStash {
crate::output::warning(format!(
"{WARNING}Failed to restore stash {WARNING_BOLD}{stash_ref}{WARNING_BOLD:#}{WARNING} - run 'git stash pop {stash_ref}' in {WARNING_BOLD}{path}{WARNING_BOLD:#}{WARNING:#}",
stash_ref = self.stash_ref,
- path = self.path.display(),
+ path = format_path_for_display(&self.path),
))?;
}
diff --git a/src/display.rs b/src/display.rs
index c59272960..9eaf6fec8 100644
--- a/src/display.rs
+++ b/src/display.rs
@@ -8,6 +8,7 @@
use std::path::{Path, PathBuf};
use std::time::{SystemTime, UNIX_EPOCH};
+use worktrunk::path::format_path_for_display;
pub fn format_relative_time(timestamp: i64) -> String {
const MINUTE: i64 = 60;
@@ -84,7 +85,7 @@ pub fn shorten_path(path: &Path, prefix: &Path) -> String {
match path.strip_prefix(prefix) {
Ok(rel) if rel.as_os_str().is_empty() => ".".to_string(),
Ok(rel) => format!("./{}", rel.display()),
- Err(_) => path.display().to_string(),
+ Err(_) => format_path_for_display(path),
}
}
diff --git a/src/git/error.rs b/src/git/error.rs
index e0c310e03..e884b3f30 100644
--- a/src/git/error.rs
+++ b/src/git/error.rs
@@ -3,6 +3,7 @@
use std::path::PathBuf;
use super::HookType;
+use crate::path::format_path_for_display;
#[derive(Debug)]
pub enum GitError {
@@ -189,7 +190,7 @@ impl std::fmt::Display for GitError {
write!(
f,
"\n{HINT_EMOJI} {HINT}Commit or stash these changes in {} first{HINT:#}",
- worktree_path.display()
+ format_path_for_display(worktree_path)
)
}
@@ -287,7 +288,7 @@ impl std::fmt::Display for GitError {
write!(
f,
"{ERROR_EMOJI} {ERROR}Directory already exists: {ERROR_BOLD}{}{ERROR_BOLD:#}{ERROR:#}\n\n{HINT_EMOJI} {HINT}Remove the directory or use a different branch name{HINT:#}",
- path.display()
+ format_path_for_display(path)
)
}
@@ -322,7 +323,7 @@ impl std::fmt::Display for GitError {
} => {
let header = format!(
"{ERROR_EMOJI} {ERROR}Failed to remove worktree for {ERROR_BOLD}{branch}{ERROR_BOLD:#}{ERROR} at {ERROR_BOLD}{}{ERROR_BOLD:#}{ERROR:#}",
- path.display()
+ format_path_for_display(path)
);
write!(f, "{}", format_error_block(header, error))
}
diff --git a/src/lib.rs b/src/lib.rs
index 6c3cdef36..c06c1162c 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,5 +1,6 @@
pub mod config;
pub mod git;
+pub mod path;
pub mod shell;
pub mod styling;
diff --git a/src/llm.rs b/src/llm.rs
index b25f7d349..3c704b008 100644
--- a/src/llm.rs
+++ b/src/llm.rs
@@ -3,6 +3,7 @@ use std::path::{Path, PathBuf};
use std::process::{self, Stdio};
use worktrunk::config::CommitGenerationConfig;
use worktrunk::git::{GitError, Repository};
+use worktrunk::path::format_path_for_display;
use minijinja::Environment;
@@ -129,7 +130,7 @@ fn build_commit_prompt(
std::fs::read_to_string(&expanded_path).map_err(|e| {
format!(
"Failed to read template-file '{}': {}",
- expanded_path.display(),
+ format_path_for_display(&expanded_path),
e
)
})?
@@ -174,7 +175,7 @@ fn build_squash_prompt(
std::fs::read_to_string(&expanded_path).map_err(|e| {
format!(
"Failed to read squash-template-file '{}': {}",
- expanded_path.display(),
+ format_path_for_display(&expanded_path),
e
)
})?
diff --git a/src/main.rs b/src/main.rs
index 248bb3575..776f5c912 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -3,6 +3,7 @@ use clap::{CommandFactory, Parser};
use std::process;
use worktrunk::config::WorktrunkConfig;
use worktrunk::git::{GitError, GitResultExt, Repository, set_base_path};
+use worktrunk::path::format_path_for_display;
use worktrunk::styling::{SUCCESS_EMOJI, println};
mod cli;
@@ -203,7 +204,7 @@ fn main() {
use worktrunk::styling::format_bash_with_gutter;
let bold = Style::new().bold();
let shell = result.shell;
- let path = result.path.display();
+ let path = format_path_for_display(&result.path);
println!(
"{} {} {bold}{shell}{bold:#} {path}",
diff --git a/src/output/handlers.rs b/src/output/handlers.rs
index 169b10530..e20ffeb28 100644
--- a/src/output/handlers.rs
+++ b/src/output/handlers.rs
@@ -4,6 +4,7 @@ use crate::commands::process::spawn_detached;
use crate::commands::worktree::{RemoveResult, SwitchResult};
use crate::output::global::format_switch_success;
use worktrunk::git::GitError;
+use worktrunk::path::format_path_for_display;
use worktrunk::styling::{
CYAN, CYAN_BOLD, GREEN, GREEN_BOLD, WARNING, WARNING_BOLD, format_with_gutter,
};
@@ -17,7 +18,7 @@ fn format_switch_message(result: &SwitchResult, branch: &str) -> (String, bool)
(
format!(
"Already on worktree for {bold}{branch}{bold:#} at {bold}{}{bold:#}",
- path.display()
+ format_path_for_display(path)
),
true, // is_info
)
@@ -85,12 +86,12 @@ fn format_remove_message(
// Re-establish GREEN after each green_bold reset to prevent color leak
format!(
"{GREEN}{action} for {GREEN_BOLD}{b}{GREEN_BOLD:#}{GREEN}, changed directory to {GREEN_BOLD}{}{GREEN_BOLD:#}{GREEN:#}{flag_note}",
- primary_path.display()
+ format_path_for_display(primary_path)
)
} else {
format!(
"{GREEN}{action}, changed directory to {GREEN_BOLD}{}{GREEN_BOLD:#}{GREEN:#}{flag_note}",
- primary_path.display()
+ format_path_for_display(primary_path)
)
}
} else if let Some(b) = branch_display {
diff --git a/src/output/mod.rs b/src/output/mod.rs
index 9deebeb0f..bef1d8967 100644
--- a/src/output/mod.rs
+++ b/src/output/mod.rs
@@ -77,6 +77,7 @@ pub use handlers::{
};
use std::path::Path;
+use worktrunk::path::format_path_for_display;
/// Format a switch success message with a consistent location phrase
///
@@ -101,11 +102,11 @@ pub(crate) fn format_switch_success_message(
match base_branch {
Some(base) => format!(
"{GREEN}{action} {GREEN_BOLD}{branch}{GREEN_BOLD:#}{GREEN} from {GREEN_BOLD}{base}{GREEN_BOLD:#}{GREEN} at {GREEN_BOLD}{}{GREEN_BOLD:#}{GREEN:#}",
- path.display()
+ format_path_for_display(path)
),
None => format!(
"{GREEN}{action} {GREEN_BOLD}{branch}{GREEN_BOLD:#}{GREEN} at {GREEN_BOLD}{}{GREEN_BOLD:#}{GREEN:#}",
- path.display()
+ format_path_for_display(path)
),
}
}
diff --git a/src/path.rs b/src/path.rs
new file mode 100644
index 000000000..723101967
--- /dev/null
+++ b/src/path.rs
@@ -0,0 +1,105 @@
+use std::path::{Path, PathBuf};
+
+/// Format a filesystem path for user-facing output.
+///
+/// When the path lives under the user's home directory, it is shown with a
+/// leading `~` (e.g., `/Users/alex/projects/wt` -> `~/projects/wt`). Paths
+/// outside home are returned unchanged.
+pub fn format_path_for_display(path: &Path) -> String {
+ fn home_dir() -> Option<PathBuf> {
+ #[cfg(windows)]
+ {
+ std::env::var_os("USERPROFILE")
+ .map(PathBuf::from)
+ .or_else(|| {
+ let drive = std::env::var_os("HOMEDRIVE")?;
+ let path = std::env::var_os("HOMEPATH")?;
+ Some(PathBuf::from(drive).join(path))
+ })
+ }
+
+ #[cfg(not(windows))]
+ {
+ std::env::var_os("HOME").map(PathBuf::from)
+ }
+ }
+
+ if let Some(home) = home_dir()
+ && let Ok(stripped) = path.strip_prefix(&home)
+ {
+ if stripped.as_os_str().is_empty() {
+ return "~".to_string();
+ }
+
+ let mut display_path = PathBuf::from("~");
+ display_path.push(stripped);
+ return display_path.display().to_string();
+ }
+
+ path.display().to_string()
+}
+
+#[cfg(test)]
+mod tests {
+ use super::format_path_for_display;
+ use std::path::PathBuf;
+
+ fn home_dir() -> Option<PathBuf> {
+ #[cfg(windows)]
+ {
+ std::env::var_os("USERPROFILE")
+ .map(PathBuf::from)
+ .or_else(|| {
+ let drive = std::env::var_os("HOMEDRIVE")?;
+ let path = std::env::var_os("HOMEPATH")?;
+ Some(PathBuf::from(drive).join(path))
+ })
+ }
+
+ #[cfg(not(windows))]
+ {
+ std::env::var_os("HOME").map(PathBuf::from)
+ }
+ }
+
+ #[test]
+ fn shortens_path_under_home() {
+ let Some(home) = home_dir() else {
+ // Skip if HOME/USERPROFILE is not set in the environment
+ return;
+ };
+
+ let path = home.join("projects").join("wt");
+ let formatted = format_path_for_display(&path);
+
+ assert!(
+ formatted.starts_with("~"),
+ "Expected tilde prefix, got {formatted}"
+ );
+ assert!(
+ formatted.contains("projects"),
+ "Expected child components to remain in output"
+ );
+ assert!(
+ formatted.ends_with("wt"),
+ "Expected leaf component to remain in output"
+ );
+ }
+
+ #[test]
+ fn shows_home_as_tilde() {
+ let Some(home) = home_dir() else {
+ return;
+ };
+
+ let formatted = format_path_for_display(&home);
+ assert_eq!(formatted, "~");
+ }
+
+ #[test]
+ fn leaves_non_home_paths_unchanged() {
+ let path = PathBuf::from("/tmp/worktrunk-non-home-path");
+ let formatted = format_path_for_display(&path);
+ assert_eq!(formatted, path.display().to_string());
+ }
+}
diff --git a/tests/integration_tests/config_init.rs b/tests/integration_tests/config_init.rs
index 95a99e561..84f8f26cd 100644
--- a/tests/integration_tests/config_init.rs
+++ b/tests/integration_tests/config_init.rs
@@ -35,7 +35,7 @@ fn test_config_init_already_exists() {
success: true
exit_code: 0
----- stdout -----
- ⚪ Global config already exists: [TEMP_HOME]/.config/worktrunk/config.toml
+ ⚪ Global config already exists: ~/.config/worktrunk/config.toml
💡 Use 'wt config list' to view existing configuration
@@ -69,7 +69,7 @@ fn test_config_init_creates_file() {
success: true
exit_code: 0
----- stdout -----
- ✅ Created config file: [TEMP_HOME]/.config/worktrunk/config.toml
+ ✅ Created config file: ~/.config/worktrunk/config.toml
💡 Edit this file to customize worktree paths and LLM settings
diff --git a/tests/integration_tests/config_list.rs b/tests/integration_tests/config_list.rs
index 9c56ffea5..e6ccdc698 100644
--- a/tests/integration_tests/config_list.rs
+++ b/tests/integration_tests/config_list.rs
@@ -56,7 +56,7 @@ server = "npm run dev"
success: true
exit_code: 0
----- stdout -----
- ⚪ Global Config: [TEMP_HOME]/.config/worktrunk/config.toml
+ ⚪ Global Config: ~/.config/worktrunk/config.toml
  worktree-path = "../{{ main_worktree }}.{{ branch }}"
 
  [[approved-commands]]
@@ -108,7 +108,7 @@ fn test_config_list_no_project_config() {
success: true
exit_code: 0
----- stdout -----
- ⚪ Global Config: [TEMP_HOME]/.config/worktrunk/config.toml
+ ⚪ Global Config: ~/.config/worktrunk/config.toml
  worktree-path = "../{{ main_worktree }}.{{ branch }}"
⚪ Project Config: [REPO]/.config/wt.toml
@@ -151,7 +151,7 @@ fn test_config_list_outside_git_repo() {
success: true
exit_code: 0
----- stdout -----
- ⚪ Global Config: [TEMP_HOME]/.config/worktrunk/config.toml
+ ⚪ Global Config: ~/.config/worktrunk/config.toml
  worktree-path = "../{{ main_worktree }}.{{ branch }}"
⚪ Project Config: Not in a git repository
diff --git a/tests/integration_tests/configure_shell.rs b/tests/integration_tests/configure_shell.rs
index fb4aeb259..cf06fbea5 100644
--- a/tests/integration_tests/configure_shell.rs
+++ b/tests/integration_tests/configure_shell.rs
@@ -31,7 +31,7 @@ fn test_configure_shell_with_yes() {
success: true
exit_code: 0
----- stdout -----
- ✅ Added zsh [TEMP_HOME]/.zshrc
+ ✅ Added zsh ~/.zshrc
  if command -v wt >/dev/null 2>&1; then eval "$(command wt init zsh)"; fi
✅ Configured 1 shell
@@ -76,7 +76,7 @@ fn test_configure_shell_specific_shell() {
success: true
exit_code: 0
----- stdout -----
- ✅ Added zsh [TEMP_HOME]/.zshrc
+ ✅ Added zsh ~/.zshrc
  if command -v wt >/dev/null 2>&1; then eval "$(command wt init zsh)"; fi
✅ Configured 1 shell
@@ -162,7 +162,7 @@ fn test_configure_shell_fish() {
success: true
exit_code: 0
----- stdout -----
- ✅ Created fish [TEMP_HOME]/.config/fish/conf.d/wt.fish
+ ✅ Created fish ~/.config/fish/conf.d/wt.fish
  if type -q wt; command wt init fish | source; end
✅ Configured 1 shell
@@ -250,9 +250,9 @@ fn test_configure_shell_multiple_configs() {
success: true
exit_code: 0
----- stdout -----
- ✅ Added bash [TEMP_HOME]/.bash_profile
+ ✅ Added bash ~/.bash_profile
  if command -v wt >/dev/null 2>&1; then eval "$(command wt init bash)"; fi
- ✅ Added zsh [TEMP_HOME]/.zshrc
+ ✅ Added zsh ~/.zshrc
  if command -v wt >/dev/null 2>&1; then eval "$(command wt init zsh)"; fi
✅ Configured 2 shells
@@ -312,9 +312,9 @@ fn test_configure_shell_mixed_states() {
success: true
exit_code: 0
----- stdout -----
- ⚪ Already configured bash [TEMP_HOME]/.bash_profile
+ ⚪ Already configured bash ~/.bash_profile
  if command -v wt >/dev/null 2>&1; then eval "$(command wt init bash)"; fi
- ✅ Added zsh [TEMP_HOME]/.zshrc
+ ✅ Added zsh ~/.zshrc
  if command -v wt >/dev/null 2>&1; then eval "$(command wt init zsh)"; fi
✅ Configured 1 shell
diff --git a/tests/snapshots/integration__integration_tests__internal_flag__config_list_with_internal_flag.snap b/tests/snapshots/integration__integration_tests__internal_flag__config_list_with_internal_flag.snap
index 6f17c34c1..3bd1b5ddb 100644
--- a/tests/snapshots/integration__integration_tests__internal_flag__config_list_with_internal_flag.snap
+++ b/tests/snapshots/integration__integration_tests__internal_flag__config_list_with_internal_flag.snap
@@ -24,7 +24,7 @@ info:
success: true
exit_code: 0
----- stdout -----
-⚪ Global Config: [TEMP_HOME]/.config/worktrunk/config.toml
+⚪ Global Config: ~/.config/worktrunk/config.toml
  worktree-path = "../{{ main_worktree }}.{{ branch }}"
⚪ Project Config: [REPO]/.config/wt.toml