Skip to content

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

Add suggest_command helper for copy-pasteable CLI hints (#244)

Maximilian Roos87d482736bbc
diff --git a/.claude/rules/cli-output-formatting.md b/.claude/rules/cli-output-formatting.md
index 746bd9d6f..5d3d2f630 100644
--- a/.claude/rules/cli-output-formatting.md
+++ b/.claude/rules/cli-output-formatting.md
@@ -171,6 +171,30 @@ a hint. If it's acknowledging what happened (including flag effects), it's info.
| "Use `--force` to override" | "Skipping hooks (--no-verify)" |
| "Branch can be deleted" | "Worktree preserved (main worktree)" |
+**Command suggestions in hints:** When suggesting a command the user should run,
+use the pattern "To X, run Y" where X describes the goal and Y is the command.
+**Always end with the command** so users can easily copy it:
+
+```rust
+// GOOD - "To X, run Y" pattern, command at end for easy copying
+"To delete the unmerged branch, run wt remove feature -D"
+"To rebase onto main, run wt step rebase or wt merge"
+"To create a new branch, run wt switch feature --create; to list branches, run wt list --branches"
+
+// GOOD - when user needs to modify their command, instruction then command
+"To switch to the remote branch, remove --create; run wt switch feature"
+
+// BAD - command without context
+"wt remove feature -D deletes unmerged branches"
+
+// BAD - command not at end (hard to copy)
+"Run wt switch feature (without --create) to switch to the remote branch"
+```
+
+Use `suggest_command()` from `worktrunk::styling` to build commands with proper
+shell escaping. Include the branch name or other specific arguments so users can
+copy-paste.
+
**Message formatting functions** add emoji AND semantic color. Callers provide
content with optional inner styling (like `<bold>`), then pass to
`output::print()`:
diff --git a/src/commands/config.rs b/src/commands/config.rs
index 84ea7ff8f..4404af9f0 100644
--- a/src/commands/config.rs
+++ b/src/commands/config.rs
@@ -89,7 +89,7 @@ fn create_config_file(
)))?;
output::blank()?;
output::print(hint_message(cformat!(
- "Use <bright-black>wt config show</> to view, or <bright-black>wt config create --help</> for format reference"
+ "For format reference, run <bright-black>wt config create --help</>; to view, run <bright-black>wt config show</>"
)))?;
return Ok(());
}
@@ -251,7 +251,7 @@ fn render_user_config(out: &mut String) -> anyhow::Result<()> {
out,
"{}",
hint_message(cformat!(
- "Not found (using defaults); <bright-black>wt config create</> creates one"
+ "Not found (using defaults); to create one, run <bright-black>wt config create</>"
))
)?;
writeln!(out)?;
@@ -453,7 +453,7 @@ fn render_shell_status(out: &mut String) -> anyhow::Result<()> {
out,
"{}",
hint_message(cformat!(
- "<bright-black>wt config shell install</> enables shell integration"
+ "To enable shell integration, run <bright-black>wt config shell install</>"
))
)?;
}
diff --git a/src/commands/configure_shell.rs b/src/commands/configure_shell.rs
index 8ca6bff27..1112fa832 100644
--- a/src/commands/configure_shell.rs
+++ b/src/commands/configure_shell.rs
@@ -936,7 +936,7 @@ pub fn handle_show_theme() -> Result<(), String> {
// Hint
crate::output::print(hint_message(cformat!(
- "Run <bright-black>wt merge</> to rebase onto main"
+ "To rebase onto main, run <bright-black>wt merge</>"
)))
.map_err(|e| e.to_string())?;
diff --git a/src/commands/worktree.rs b/src/commands/worktree.rs
index 2ab2a150c..81e93e192 100644
--- a/src/commands/worktree.rs
+++ b/src/commands/worktree.rs
@@ -119,7 +119,7 @@ use worktrunk::config::WorktrunkConfig;
use worktrunk::git::{GitError, Repository, ResolvedWorktree};
use worktrunk::styling::{
format_with_gutter, hint_message, info_message, progress_message, success_message,
- warning_message,
+ suggest_command, warning_message,
};
use super::command_executor::CommandContext;
@@ -474,8 +474,9 @@ pub fn handle_switch(
crate::output::print(warning_message(cformat!(
"Branch <bold>{resolved_branch}</> exists on remote ({remote_ref}); creating new branch from base instead"
)))?;
+ let cmd = suggest_command("switch", &[&resolved_branch], &[]);
crate::output::print(hint_message(cformat!(
- "Use <bright-black>wt switch {resolved_branch}</> (without <bright-black>--create</>) to switch to the remote branch"
+ "To switch to the remote branch, remove <bright-black>--create</>; run <bright-black>{cmd}</>"
)))?;
}
}
diff --git a/src/git/error.rs b/src/git/error.rs
index 5be747ea0..25f6e5048 100644
--- a/src/git/error.rs
+++ b/src/git/error.rs
@@ -17,7 +17,7 @@ use super::HookType;
use crate::path::format_path_for_display;
use crate::styling::{
ERROR_EMOJI, HINT_EMOJI, error_message, format_bash_with_gutter, format_with_gutter,
- hint_message, info_message,
+ hint_message, info_message, suggest_command,
};
/// Domain errors for git and worktree operations.
@@ -184,12 +184,14 @@ impl std::fmt::Display for GitError {
}
GitError::InvalidReference { reference } => {
+ let create_cmd = suggest_command("switch", &[reference], &["--create"]);
+ let list_cmd = suggest_command("list", &[], &["--branches", "--remotes"]);
write!(
f,
"{}\n\n{}",
error_message(cformat!("Branch <bold>{reference}</> not found")),
hint_message(cformat!(
- "Use <bright-black>--create</> to create a new branch, or <bright-black>wt list --branches --remotes</> for available branches"
+ "To create a new branch, run <bright-black>{create_cmd}</>; to list branches, run <bright-black>{list_cmd}</>"
))
)
}
@@ -200,7 +202,7 @@ impl std::fmt::Display for GitError {
"{}\n\n{}",
error_message(cformat!("Worktree directory missing for <bold>{branch}</>")),
hint_message(cformat!(
- "Run <bright-black>git worktree prune</> to clean up"
+ "To clean up, run <bright-black>git worktree prune</>"
))
)
}
@@ -214,9 +216,10 @@ impl std::fmt::Display for GitError {
}
GitError::RemoteOnlyBranch { branch, remote } => {
+ let cmd = suggest_command("switch", &[branch], &[]);
cwrite!(
f,
- "{ERROR_EMOJI} <red>Branch <bold>{branch}</> exists only on remote ({remote}/{branch})</>\n\n{HINT_EMOJI} <dim>Use <bright-black>wt switch {branch}</> to create a local worktree</>"
+ "{ERROR_EMOJI} <red>Branch <bold>{branch}</> exists only on remote ({remote}/{branch})</>\n\n{HINT_EMOJI} <dim>To create a local worktree, run <bright-black>{cmd}</></>"
)
}
@@ -337,20 +340,22 @@ impl std::fmt::Display for GitError {
write!(f, "\n{}", format_with_gutter(commits_formatted, "", None))?;
}
// Context-appropriate hint
+ let merge_cmd = suggest_command("merge", &[target_branch], &[]);
if *in_merge_context {
write!(
f,
"\n{}",
hint_message(cformat!(
- "Run <bright-black>wt merge</> again to incorporate these changes"
+ "To incorporate these changes, run <bright-black>{merge_cmd}</> again"
))
)
} else {
+ let rebase_cmd = suggest_command("step", &["rebase", target_branch], &[]);
write!(
f,
"\n{}",
hint_message(cformat!(
- "Use <bright-black>wt step rebase</> or <bright-black>wt merge</> to rebase onto <bold>{target_branch}</>"
+ "To rebase onto <bold>{target_branch}</>, run <bright-black>{rebase_cmd}</>"
))
)
}
@@ -362,7 +367,7 @@ impl std::fmt::Display for GitError {
"{}\n\n{}",
error_message("Found merge commits in push range"),
hint_message(cformat!(
- "Use <bright-black>--allow-merge-commits</> to push non-linear history"
+ "To push non-linear history, add <bright-black>--allow-merge-commits</>"
))
)
}
@@ -393,12 +398,13 @@ impl std::fmt::Display for GitError {
}
GitError::NotRebased { target_branch } => {
+ let rebase_cmd = suggest_command("step", &["rebase", target_branch], &[]);
write!(
f,
"{}\n\n{}",
error_message(cformat!("Branch not rebased onto <bold>{target_branch}</>")),
hint_message(cformat!(
- "Run <bright-black>wt rebase</> first or remove <bright-black>--no-rebase</>"
+ "Remove <bright-black>--no-rebase</>; or to rebase first, run <bright-black>{rebase_cmd}</>"
))
)
}
@@ -615,7 +621,7 @@ impl std::fmt::Display for HookErrorWithHint {
f,
"\n\n{}",
hint_message(cformat!(
- "Use <bright-black>--no-verify</> to skip {} commands",
+ "To skip {} commands, add <bright-black>--no-verify</>",
self.hook_type
))
)
diff --git a/src/output/handlers.rs b/src/output/handlers.rs
index d30ee2f9f..0ff184c19 100644
--- a/src/output/handlers.rs
+++ b/src/output/handlers.rs
@@ -16,7 +16,7 @@ use worktrunk::path::format_path_for_display;
use worktrunk::shell::Shell;
use worktrunk::styling::{
FormattedMessage, PROGRESS_EMOJI, error_message, format_with_gutter, hint_message,
- info_message, progress_message, success_message, warning_message,
+ info_message, progress_message, success_message, suggest_command, warning_message,
};
/// Format a switch message with a consistent location phrase
@@ -174,8 +174,9 @@ fn handle_branch_deletion_result(
super::print(info_message(cformat!(
"Branch <bold>{branch_name}</> retained; has unmerged changes"
)))?;
+ let cmd = suggest_command("remove", &[branch_name], &["-D"]);
super::print(hint_message(cformat!(
- "<bright-black>wt remove -D</> deletes unmerged branches"
+ "To delete the unmerged branch, run <bright-black>{cmd}</>"
)))?;
}
Ok((r, defer_output))
@@ -620,8 +621,9 @@ fn handle_removed_worktree_output(
// Show hint for unmerged branches (same as synchronous path)
if !deletion_mode.should_keep() && !should_delete_branch {
+ let cmd = suggest_command("remove", &[branch_name], &["-D"]);
super::print(hint_message(cformat!(
- "<bright-black>wt remove -D</> deletes unmerged branches"
+ "To delete the unmerged branch, run <bright-black>{cmd}</>"
)))?;
}
@@ -695,8 +697,9 @@ fn handle_removed_worktree_output(
// Show hint for unmerged branches (after success message)
if show_hint {
+ let cmd = suggest_command("remove", &[branch_name], &["-D"]);
super::print(hint_message(cformat!(
- "<bright-black>wt remove -D</> deletes unmerged branches"
+ "To delete the unmerged branch, run <bright-black>{cmd}</>"
)))?;
}
diff --git a/src/styling/mod.rs b/src/styling/mod.rs
index 6d31b5556..61d1cef51 100644
--- a/src/styling/mod.rs
+++ b/src/styling/mod.rs
@@ -17,6 +17,7 @@ mod constants;
mod format;
mod highlighting;
mod line;
+mod suggest;
// Re-exports from anstream (auto-detecting output)
pub use anstream::{eprint, eprintln, print, println, stderr, stdout};
@@ -31,6 +32,7 @@ pub(crate) use format::format_bash_with_gutter_at_width;
pub use format::{GUTTER_OVERHEAD, format_bash_with_gutter, format_with_gutter};
pub use highlighting::format_toml;
pub use line::{StyledLine, StyledString, truncate_visible};
+pub use suggest::suggest_command;
/// Default terminal width fallback if detection fails
const DEFAULT_TERMINAL_WIDTH: usize = 80;
diff --git a/src/styling/suggest.rs b/src/styling/suggest.rs
new file mode 100644
index 000000000..609a8e022
--- /dev/null
+++ b/src/styling/suggest.rs
@@ -0,0 +1,183 @@
+//! Command suggestion helpers for hint messages.
+//!
+//! Build copy-pasteable commands for user suggestions:
+//!
+//! ```
+//! use worktrunk::styling::{suggest_command, hint_message};
+//! use color_print::cformat;
+//!
+//! let branch = "feature";
+//! let cmd = suggest_command("remove", &[branch], &["--force"]);
+//! println!("{}", hint_message(cformat!("To force delete, run <bright-black>{cmd}</>")));
+//! // β†’ πŸ’‘ To force delete, run wt remove feature --force
+//! ```
+//!
+//! Handles shell escaping and `--` separator for args starting with `-`:
+//!
+//! ```
+//! use worktrunk::styling::suggest_command;
+//!
+//! // Branch starting with dash gets -- separator
+//! let cmd = suggest_command("remove", &["-bugfix"], &["--force"]);
+//! assert_eq!(cmd, "wt remove -- -bugfix --force");
+//!
+//! // Spaces are quoted
+//! let cmd = suggest_command("remove", &["my feature"], &[]);
+//! assert_eq!(cmd, "wt remove 'my feature'");
+//! ```
+
+use shell_escape::escape;
+use std::borrow::Cow;
+
+/// Build a suggested command string for hints.
+///
+/// Returns a copy-pasteable command like `wt remove feature --force`.
+///
+/// # Arguments
+///
+/// * `subcommand` - The subcommand name (e.g., "remove", "switch", "merge")
+/// * `args` - Positional arguments (branch names, paths, etc.)
+/// * `flags` - Additional flags to suggest (e.g., "--force", "-D")
+///
+/// # Shell escaping
+///
+/// Arguments containing spaces, quotes, or special shell characters are
+/// automatically escaped using POSIX single-quote style.
+///
+/// # Dash-prefixed arguments
+///
+/// If any positional argument starts with `-`, a `--` separator is inserted
+/// before it to prevent shell/clap from interpreting it as a flag.
+///
+/// # Design note: Global flags
+///
+/// Intentionally excludes global flags like `-C` (working directory).
+/// Suggestions show the operation, not the invocation context.
+/// Users may have changed directory since the error occurred.
+///
+/// If we later find users frequently need `-C` in suggestions (e.g., scripting
+/// contexts), we could add an optional `global_flags` parameter.
+pub fn suggest_command(subcommand: &str, args: &[&str], flags: &[&str]) -> String {
+ let mut parts = vec!["wt".to_string(), subcommand.to_string()];
+
+ // Check if any arg starts with dash (needs -- separator)
+ let needs_separator = args.iter().any(|arg| arg.starts_with('-'));
+ let mut separator_inserted = false;
+
+ for arg in args {
+ // Insert -- before the first dash-prefixed arg
+ if needs_separator && arg.starts_with('-') && !separator_inserted {
+ parts.push("--".to_string());
+ separator_inserted = true;
+ }
+ parts.push(escape(Cow::Borrowed(*arg)).into_owned());
+ }
+
+ parts.extend(flags.iter().map(|s| s.to_string()));
+ parts.join(" ")
+}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+
+ #[test]
+ fn test_simple_command() {
+ assert_eq!(
+ suggest_command("remove", &["feature"], &[]),
+ "wt remove feature"
+ );
+ }
+
+ #[test]
+ fn test_command_with_flag() {
+ assert_eq!(
+ suggest_command("remove", &["feature"], &["--force"]),
+ "wt remove feature --force"
+ );
+ }
+
+ #[test]
+ fn test_command_with_multiple_flags() {
+ assert_eq!(
+ suggest_command("remove", &["feature"], &["--force", "--no-delete-branch"]),
+ "wt remove feature --force --no-delete-branch"
+ );
+ }
+
+ #[test]
+ fn test_branch_with_spaces() {
+ assert_eq!(
+ suggest_command("remove", &["my feature"], &[]),
+ "wt remove 'my feature'"
+ );
+ }
+
+ #[test]
+ fn test_branch_with_special_chars() {
+ assert_eq!(
+ suggest_command("remove", &["feature$1"], &[]),
+ "wt remove 'feature$1'"
+ );
+ }
+
+ #[test]
+ fn test_branch_starting_with_dash() {
+ assert_eq!(
+ suggest_command("remove", &["-bugfix"], &[]),
+ "wt remove -- -bugfix"
+ );
+ }
+
+ #[test]
+ fn test_branch_starting_with_dash_and_flag() {
+ assert_eq!(
+ suggest_command("remove", &["-bugfix"], &["--force"]),
+ "wt remove -- -bugfix --force"
+ );
+ }
+
+ #[test]
+ fn test_multiple_args() {
+ assert_eq!(
+ suggest_command("remove", &["feature", "bugfix"], &[]),
+ "wt remove feature bugfix"
+ );
+ }
+
+ #[test]
+ fn test_mixed_args_one_starting_with_dash() {
+ // When one arg starts with dash, -- is inserted before it
+ assert_eq!(
+ suggest_command("remove", &["feature", "-bugfix"], &[]),
+ "wt remove feature -- -bugfix"
+ );
+ }
+
+ #[test]
+ fn test_multiple_dash_prefixed_args() {
+ // All dash-prefixed args follow the -- separator
+ assert_eq!(
+ suggest_command("remove", &["-bugfix", "-feature"], &[]),
+ "wt remove -- -bugfix -feature"
+ );
+ }
+
+ #[test]
+ fn test_branch_with_single_quote() {
+ assert_eq!(
+ suggest_command("remove", &["it's-a-branch"], &[]),
+ "wt remove 'it'\\''s-a-branch'"
+ );
+ }
+
+ #[test]
+ fn test_no_args() {
+ assert_eq!(suggest_command("list", &[], &[]), "wt list");
+ }
+
+ #[test]
+ fn test_flag_only() {
+ assert_eq!(suggest_command("list", &[], &["--full"]), "wt list --full");
+ }
+}
diff --git a/tests/integration_tests/config_init.rs b/tests/integration_tests/config_init.rs
index 987b88628..d589b65e1 100644
--- a/tests/integration_tests/config_init.rs
+++ b/tests/integration_tests/config_init.rs
@@ -34,7 +34,7 @@ fn test_config_init_already_exists(temp_home: TempDir) {
----- stderr -----
βšͺ User config already exists: ~/.config/worktrunk/config.toml
- πŸ’‘ Use wt config show to view, or wt config create --help for format reference
+ πŸ’‘ For format reference, run wt config create --help; to view, run wt config show
");
});
}
@@ -121,7 +121,7 @@ run = "echo hello"
----- stderr -----
βšͺ Project config already exists: [REPO]/.config/wt.toml
- πŸ’‘ Use wt config show to view, or wt config create --help for format reference
+ πŸ’‘ For format reference, run wt config create --help; to view, run wt config show
");
});
}
diff --git a/tests/integration_tests/directives.rs b/tests/integration_tests/directives.rs
index 3202e520e..73e4a2e23 100644
--- a/tests/integration_tests/directives.rs
+++ b/tests/integration_tests/directives.rs
@@ -108,7 +108,7 @@ fn test_switch_internal_directive(repo: TestRepo) {
----- stderr -----
❌ Branch my-feature not found
- πŸ’‘ Use --create to create a new branch, or wt list --branches --remotes for available branches
+ πŸ’‘ To create a new branch, run wt switch my-feature --create; to list branches, run wt list --branches --remotes
");
});
}
@@ -134,7 +134,7 @@ fn test_switch_without_internal(repo: TestRepo) {
----- stderr -----
❌ Branch my-feature not found
- πŸ’‘ Use --create to create a new branch, or wt list --branches --remotes for available branches
+ πŸ’‘ To create a new branch, run wt switch my-feature --create; to list branches, run wt list --branches --remotes
");
});
}
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__config_show_theme__show_theme.snap b/tests/integration_tests/snapshots/integration__integration_tests__config_show_theme__show_theme.snap
index 047088c12..279865691 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__config_show_theme__show_theme.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__config_show_theme__show_theme.snap
@@ -22,7 +22,7 @@ exit_code: 0
βœ… Created worktree for feature @ /path/to/worktree
❌ Branch feature not found
🟑 Branch feature has uncommitted changes
-πŸ’‘ Run wt merge to rebase onto main
+πŸ’‘ To rebase onto main, run wt merge
βšͺ Showing 5 worktrees
βšͺ Gutter formatting (quoted content):
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__hook_command_failed_with_skip_hint.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__hook_command_failed_with_skip_hint.snap
index ff34eb921..2fe09f073 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__hook_command_failed_with_skip_hint.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__hook_command_failed_with_skip_hint.snap
@@ -4,4 +4,4 @@ expression: err_with_hint.to_string()
---
❌ pre-merge command failed: test: exit code 1
-πŸ’‘ Use --no-verify to skip pre-merge commands
+πŸ’‘ To skip pre-merge commands, add --no-verify
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__invalid_reference.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__invalid_reference.snap
index 06ad5eb32..a68c71bf5 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__invalid_reference.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__invalid_reference.snap
@@ -1,7 +1,7 @@
---
-source: tests/git_error_display.rs
+source: tests/integration_tests/git_error_display.rs
expression: err.to_string()
---
❌ Branch nonexistent-branch not found
-πŸ’‘ Use --create to create a new branch, or wt list --branches --remotes for available branches
+πŸ’‘ To create a new branch, run wt switch nonexistent-branch --create; to list branches, run wt list --branches --remotes
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__merge_commits_found.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__merge_commits_found.snap
index 3f40b3920..881b05c29 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__merge_commits_found.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__merge_commits_found.snap
@@ -1,7 +1,7 @@
---
-source: tests/git_error_display.rs
+source: tests/integration_tests/git_error_display.rs
expression: err.to_string()
---
❌ Found merge commits in push range
-πŸ’‘ Use --allow-merge-commits to push non-linear history
+πŸ’‘ To push non-linear history, add --allow-merge-commits
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__not_fast_forward.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__not_fast_forward.snap
index 8d027c2cf..28ebeaec9 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__not_fast_forward.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__not_fast_forward.snap
@@ -1,9 +1,9 @@
---
-source: tests/git_error_display.rs
+source: tests/integration_tests/git_error_display.rs
expression: err.to_string()
---
❌ Can't push to local main branch: it has newer commits
  abc1234 Fix bug
  def5678 Add feature
-πŸ’‘ Use wt step rebase or wt merge to rebase onto main
+πŸ’‘ To rebase onto main, run wt step rebase main
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__not_fast_forward_merge_context.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__not_fast_forward_merge_context.snap
index 89124187a..d1dfaffff 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__not_fast_forward_merge_context.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__not_fast_forward_merge_context.snap
@@ -1,8 +1,8 @@
---
-source: tests/git_error_display.rs
+source: tests/integration_tests/git_error_display.rs
expression: err.to_string()
---
❌ Can't push to local main branch: it has newer commits
  abc1234 New commit on main
-πŸ’‘ Run wt merge again to incorporate these changes
+πŸ’‘ To incorporate these changes, run wt merge main again
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__remote_only_branch.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__remote_only_branch.snap
index 19158791d..7c850c80c 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__remote_only_branch.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__remote_only_branch.snap
@@ -1,7 +1,7 @@
---
-source: tests/git_error_display.rs
+source: tests/integration_tests/git_error_display.rs
expression: err.to_string()
---
❌ Branch feature exists only on remote (origin/feature)
-πŸ’‘ Use wt switch feature to create a local worktree
+πŸ’‘ To create a local worktree, run wt switch feature
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__worktree_missing.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__worktree_missing.snap
index 731368472..c89c7d8b4 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__worktree_missing.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__worktree_missing.snap
@@ -1,7 +1,7 @@
---
-source: tests/git_error_display.rs
+source: tests/integration_tests/git_error_display.rs
expression: err.to_string()
---
❌ Worktree directory missing for stale-branch
-πŸ’‘ Run git worktree prune to clean up
+πŸ’‘ To clean up, run git worktree prune
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_bash.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_bash.snap
index 9e6480cee..250afddf6 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_bash.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_bash.snap
@@ -10,4 +10,4 @@ expression: output.normalized()
βœ— Test suite failed: 3 tests failing
❌ pre-merge command failed: test: exit status: 1
-πŸ’‘ Use --no-verify to skip pre-merge commands
+πŸ’‘ To skip pre-merge commands, add --no-verify
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_zsh.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_zsh.snap
index 9e6480cee..250afddf6 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_zsh.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_zsh.snap
@@ -10,4 +10,4 @@ expression: output.normalized()
βœ— Test suite failed: 3 tests failing
❌ pre-merge command failed: test: exit status: 1
-πŸ’‘ Use --no-verify to skip pre-merge commands
+πŸ’‘ To skip pre-merge commands, add --no-verify
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_partial_shell_config_shows_hint.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_partial_shell_config_shows_hint.snap
index 59027ede1..5381dd997 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_partial_shell_config_shows_hint.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_partial_shell_config_shows_hint.snap
@@ -14,6 +14,7 @@ info:
GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
GIT_CONFIG_SYSTEM: /dev/null
GIT_EDITOR: ""
+ GIT_TERMINAL_PROMPT: "0"
HOME: "[TEST_HOME]"
LANG: C
LC_ALL: C
@@ -40,4 +41,4 @@ exit_code: 0
βšͺ Already configured shell extension & completions for zsh @ ~/.zshrc
βšͺ Skipped fish; ~/.config/fish/conf.d not found
-πŸ’‘ wt config shell install enables shell integration
+πŸ’‘ To enable shell integration, run wt config shell install
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_no_rebase_not_rebased.snap b/tests/snapshots/integration__integration_tests__merge__merge_no_rebase_not_rebased.snap
index 84e6b79d7..747c309bc 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_no_rebase_not_rebased.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_no_rebase_not_rebased.snap
@@ -15,6 +15,7 @@ info:
GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
GIT_CONFIG_SYSTEM: /dev/null
GIT_EDITOR: ""
+ GIT_TERMINAL_PROMPT: "0"
HOME: "[TEST_HOME]"
LANG: C
LC_ALL: C
@@ -31,4 +32,4 @@ exit_code: 1
----- stderr -----
❌ Branch not rebased onto main
-πŸ’‘ Run wt rebase first or remove --no-rebase
+πŸ’‘ Remove --no-rebase; or to rebase first, run wt step rebase main
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 031257890..ab1a0c83d 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
@@ -41,4 +41,4 @@ exit_code: 1
🟑 Command failed: exit status: 1
❌ post-merge command failed: exit status: 1
-πŸ’‘ Use --no-verify to skip post-merge commands
+πŸ’‘ To skip post-merge commands, add --no-verify
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 8b31283af..f90545eea 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
@@ -7,6 +7,7 @@ info:
- main
- "--force"
env:
+ APPDATA: "[TEST_CONFIG_HOME]"
CLICOLOR_FORCE: "1"
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
@@ -14,10 +15,15 @@ info:
GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
GIT_CONFIG_SYSTEM: /dev/null
GIT_EDITOR: ""
+ GIT_TERMINAL_PROMPT: "0"
+ HOME: "[TEST_HOME]"
LANG: C
LC_ALL: C
+ PATH: "[PATH]"
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: false
exit_code: 1
@@ -30,4 +36,4 @@ exit_code: 1
  exit 1
❌ pre-commit command failed: exit status: 1
-πŸ’‘ Use --no-verify to skip pre-commit commands
+πŸ’‘ To skip pre-commit commands, add --no-verify
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 ff313430d..c3b29d00b 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
@@ -7,6 +7,7 @@ info:
- main
- "--force"
env:
+ APPDATA: "[TEST_CONFIG_HOME]"
CLICOLOR_FORCE: "1"
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
@@ -14,10 +15,15 @@ info:
GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
GIT_CONFIG_SYSTEM: /dev/null
GIT_EDITOR: ""
+ GIT_TERMINAL_PROMPT: "0"
+ HOME: "[TEST_HOME]"
LANG: C
LC_ALL: C
+ PATH: "[PATH]"
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: false
exit_code: 1
@@ -28,4 +34,4 @@ exit_code: 1
  exit 1
❌ pre-merge command failed: exit status: 1
-πŸ’‘ Use --no-verify to skip pre-merge commands
+πŸ’‘ To skip pre-merge commands, add --no-verify
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 c1a54c517..a557aa3e5 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
@@ -7,6 +7,7 @@ info:
- main
- "--force"
env:
+ APPDATA: "[TEST_CONFIG_HOME]"
CLICOLOR_FORCE: "1"
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
@@ -14,10 +15,15 @@ info:
GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
GIT_CONFIG_SYSTEM: /dev/null
GIT_EDITOR: ""
+ GIT_TERMINAL_PROMPT: "0"
+ HOME: "[TEST_HOME]"
LANG: C
LC_ALL: C
+ PATH: "[PATH]"
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: false
exit_code: 1
@@ -28,4 +34,4 @@ exit_code: 1
  exit 1
❌ pre-commit command failed: exit status: 1
-πŸ’‘ Use --no-verify to skip pre-commit commands
+πŸ’‘ To skip pre-commit commands, add --no-verify
diff --git a/tests/snapshots/integration__integration_tests__push__push_error_not_fast_forward.snap b/tests/snapshots/integration__integration_tests__push__push_error_not_fast_forward.snap
index 703da3c4c..883bd5a99 100644
--- a/tests/snapshots/integration__integration_tests__push__push_error_not_fast_forward.snap
+++ b/tests/snapshots/integration__integration_tests__push__push_error_not_fast_forward.snap
@@ -15,6 +15,7 @@ info:
GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
GIT_CONFIG_SYSTEM: /dev/null
GIT_EDITOR: ""
+ GIT_TERMINAL_PROMPT: "0"
HOME: "[TEST_HOME]"
LANG: C
LC_ALL: C
@@ -32,4 +33,4 @@ exit_code: 1
❌ Can't push to local main branch: it has newer commits
  * 54bc2d7 Main commit
-πŸ’‘ Use wt step rebase or wt merge to rebase onto main
+πŸ’‘ To rebase onto main, run wt step rebase main
diff --git a/tests/snapshots/integration__integration_tests__push__push_error_with_merge_commits.snap b/tests/snapshots/integration__integration_tests__push__push_error_with_merge_commits.snap
index a4b28aaeb..7b53ff818 100644
--- a/tests/snapshots/integration__integration_tests__push__push_error_with_merge_commits.snap
+++ b/tests/snapshots/integration__integration_tests__push__push_error_with_merge_commits.snap
@@ -7,6 +7,7 @@ info:
- push
- main
env:
+ APPDATA: "[TEST_CONFIG_HOME]"
CLICOLOR_FORCE: "1"
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
@@ -14,10 +15,15 @@ info:
GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
GIT_CONFIG_SYSTEM: /dev/null
GIT_EDITOR: ""
+ GIT_TERMINAL_PROMPT: "0"
+ HOME: "[TEST_HOME]"
LANG: C
LC_ALL: C
+ PATH: "[PATH]"
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: false
exit_code: 1
@@ -26,4 +32,4 @@ exit_code: 1
----- stderr -----
❌ Found merge commits in push range
-πŸ’‘ Use --allow-merge-commits to push non-linear history
+πŸ’‘ To push non-linear history, add --allow-merge-commits
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 247c3bd51..aef3f2903 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
@@ -1,6 +1,5 @@
---
source: tests/integration_tests/remove.rs
-assertion_line: 28
info:
program: wt
args:
@@ -16,6 +15,7 @@ info:
GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
GIT_CONFIG_SYSTEM: /dev/null
GIT_EDITOR: ""
+ GIT_TERMINAL_PROMPT: "0"
HOME: "[TEST_HOME]"
LANG: C
LC_ALL: C
@@ -35,4 +35,4 @@ exit_code: 1
  exit 1
❌ pre-remove command failed: exit status: 1
-πŸ’‘ Use --no-verify to skip pre-remove commands
+πŸ’‘ To skip pre-remove commands, add --no-verify
diff --git a/tests/snapshots/integration__integration_tests__remove__remove_branch_not_fully_merged.snap b/tests/snapshots/integration__integration_tests__remove__remove_branch_not_fully_merged.snap
index 6eaf1435a..ec9ddf0eb 100644
--- a/tests/snapshots/integration__integration_tests__remove__remove_branch_not_fully_merged.snap
+++ b/tests/snapshots/integration__integration_tests__remove__remove_branch_not_fully_merged.snap
@@ -30,4 +30,4 @@ exit_code: 0
----- stderr -----
πŸ”„ Removing feature-unmerged worktree in background; retaining unmerged branch
-πŸ’‘ wt remove -D deletes unmerged branches
+πŸ’‘ To delete the unmerged branch, run wt remove feature-unmerged -D
diff --git a/tests/snapshots/integration__integration_tests__remove__remove_branch_only_unmerged.snap b/tests/snapshots/integration__integration_tests__remove__remove_branch_only_unmerged.snap
index ca2cae1a3..dc36351f0 100644
--- a/tests/snapshots/integration__integration_tests__remove__remove_branch_only_unmerged.snap
+++ b/tests/snapshots/integration__integration_tests__remove__remove_branch_only_unmerged.snap
@@ -6,6 +6,7 @@ info:
- remove
- feature-unmerged
env:
+ APPDATA: "[TEST_CONFIG_HOME]"
CLICOLOR_FORCE: "1"
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
@@ -13,10 +14,15 @@ info:
GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
GIT_CONFIG_SYSTEM: /dev/null
GIT_EDITOR: ""
+ GIT_TERMINAL_PROMPT: "0"
+ HOME: "[TEST_HOME]"
LANG: C
LC_ALL: C
+ PATH: "[PATH]"
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: true
exit_code: 0
@@ -25,4 +31,4 @@ exit_code: 0
----- stderr -----
🟑 No worktree found for branch feature-unmerged
βšͺ Branch feature-unmerged retained; has unmerged changes
-πŸ’‘ wt remove -D deletes unmerged branches
+πŸ’‘ To delete the unmerged branch, run wt remove feature-unmerged -D
diff --git a/tests/snapshots/integration__integration_tests__remove__remove_foreground_unmerged.snap b/tests/snapshots/integration__integration_tests__remove__remove_foreground_unmerged.snap
index 01f468d39..223ccb0d8 100644
--- a/tests/snapshots/integration__integration_tests__remove__remove_foreground_unmerged.snap
+++ b/tests/snapshots/integration__integration_tests__remove__remove_foreground_unmerged.snap
@@ -1,6 +1,5 @@
---
source: tests/integration_tests/remove.rs
-assertion_line: 28
info:
program: wt
args:
@@ -16,6 +15,7 @@ info:
GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
GIT_CONFIG_SYSTEM: /dev/null
GIT_EDITOR: ""
+ GIT_TERMINAL_PROMPT: "0"
HOME: "[TEST_HOME]"
LANG: C
LC_ALL: C
@@ -32,4 +32,4 @@ exit_code: 0
----- stderr -----
πŸ”„ Removing feature-unmerged-fg worktree...
βœ… Removed feature-unmerged-fg worktree; retaining unmerged branch
-πŸ’‘ wt remove -D deletes unmerged branches
+πŸ’‘ To delete the unmerged branch, run wt remove feature-unmerged-fg -D
diff --git a/tests/snapshots/integration__integration_tests__remove__remove_remote_only_branch.snap b/tests/snapshots/integration__integration_tests__remove__remove_remote_only_branch.snap
index 47f0f8734..f76715bb0 100644
--- a/tests/snapshots/integration__integration_tests__remove__remove_remote_only_branch.snap
+++ b/tests/snapshots/integration__integration_tests__remove__remove_remote_only_branch.snap
@@ -6,6 +6,7 @@ info:
- remove
- remote-feature
env:
+ APPDATA: "[TEST_CONFIG_HOME]"
CLICOLOR_FORCE: "1"
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
@@ -13,10 +14,15 @@ info:
GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
GIT_CONFIG_SYSTEM: /dev/null
GIT_EDITOR: ""
+ GIT_TERMINAL_PROMPT: "0"
+ HOME: "[TEST_HOME]"
LANG: C
LC_ALL: C
+ PATH: "[PATH]"
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: false
exit_code: 1
@@ -25,4 +31,4 @@ exit_code: 1
----- stderr -----
❌ Branch remote-feature exists only on remote (origin/remote-feature)
-πŸ’‘ Use wt switch remote-feature to create a local worktree
+πŸ’‘ To create a local worktree, run wt switch remote-feature
diff --git a/tests/snapshots/integration__integration_tests__security__error_message_with_directive_not_executed.snap b/tests/snapshots/integration__integration_tests__security__error_message_with_directive_not_executed.snap
index 363156d04..503f337e6 100644
--- a/tests/snapshots/integration__integration_tests__security__error_message_with_directive_not_executed.snap
+++ b/tests/snapshots/integration__integration_tests__security__error_message_with_directive_not_executed.snap
@@ -7,6 +7,7 @@ info:
- switch
- __WORKTRUNK_EXEC__echo PWNED > /tmp/hacked6
env:
+ APPDATA: "[TEST_CONFIG_HOME]"
CLICOLOR_FORCE: "1"
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
@@ -14,10 +15,15 @@ info:
GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
GIT_CONFIG_SYSTEM: /dev/null
GIT_EDITOR: ""
+ GIT_TERMINAL_PROMPT: "0"
+ HOME: "[TEST_HOME]"
LANG: C
LC_ALL: C
+ PATH: "[PATH]"
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: false
exit_code: 1
@@ -26,4 +32,4 @@ exit_code: 1
----- stderr -----
❌ Branch __WORKTRUNK_EXEC__echo PWNED > /tmp/hacked6 not found
-πŸ’‘ Use --create to create a new branch, or wt list --branches --remotes for available branches
+πŸ’‘ To create a new branch, run wt switch '__WORKTRUNK_EXEC__echo PWNED > /tmp/hacked6' --create; to list branches, run wt list --branches --remotes
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_create_remote_only.snap b/tests/snapshots/integration__integration_tests__switch__switch_create_remote_only.snap
index 966ae8045..7e7afc3f1 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_create_remote_only.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_create_remote_only.snap
@@ -31,6 +31,6 @@ exit_code: 0
----- stderr -----
🟑 Branch remote-feature exists on remote (origin/remote-feature); creating new branch from base instead
-πŸ’‘ Use wt switch remote-feature (without --create) to switch to the remote branch
+πŸ’‘ To switch to the remote branch, remove --create; run wt switch remote-feature
βœ… Created new worktree for remote-feature from main @ [REPO].remote-feature
πŸ’‘ Run wt config shell install to enable automatic cd
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_error_missing_directory.snap b/tests/snapshots/integration__integration_tests__switch__switch_error_missing_directory.snap
index 85e6e29ae..a0c43da04 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_error_missing_directory.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_error_missing_directory.snap
@@ -6,6 +6,7 @@ info:
- switch
- missing-wt
env:
+ APPDATA: "[TEST_CONFIG_HOME]"
CLICOLOR_FORCE: "1"
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
@@ -13,11 +14,15 @@ info:
GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
GIT_CONFIG_SYSTEM: /dev/null
GIT_EDITOR: ""
+ GIT_TERMINAL_PROMPT: "0"
HOME: "[TEST_HOME]"
LANG: C
LC_ALL: C
+ PATH: "[PATH]"
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: false
exit_code: 1
@@ -26,4 +31,4 @@ exit_code: 1
----- stderr -----
❌ Worktree directory missing for missing-wt
-πŸ’‘ Run git worktree prune to clean up
+πŸ’‘ To clean up, run git worktree prune
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 15542d588..b1b50f581 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
@@ -8,6 +8,7 @@ info:
- "--force"
- "--no-remove"
env:
+ APPDATA: "[TEST_CONFIG_HOME]"
CLICOLOR_FORCE: "1"
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
@@ -15,10 +16,15 @@ info:
GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
GIT_CONFIG_SYSTEM: /dev/null
GIT_EDITOR: ""
+ GIT_TERMINAL_PROMPT: "0"
+ HOME: "[TEST_HOME]"
LANG: C
LC_ALL: C
+ PATH: "[PATH]"
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: false
exit_code: 1
@@ -31,4 +37,4 @@ exit_code: 1
  exit 1
❌ pre-commit command failed: lint: exit status: 1
-πŸ’‘ Use --no-verify to skip pre-commit commands
+πŸ’‘ To skip pre-commit commands, add --no-verify
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 8a13016d8..04487b799 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
@@ -8,6 +8,7 @@ info:
- "--force"
- "--no-remove"
env:
+ APPDATA: "[TEST_CONFIG_HOME]"
CLICOLOR_FORCE: "1"
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
@@ -15,10 +16,15 @@ info:
GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
GIT_CONFIG_SYSTEM: /dev/null
GIT_EDITOR: ""
+ GIT_TERMINAL_PROMPT: "0"
+ HOME: "[TEST_HOME]"
LANG: C
LC_ALL: C
+ PATH: "[PATH]"
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: false
exit_code: 1
@@ -29,4 +35,4 @@ exit_code: 1
  exit 1
❌ pre-merge command failed: check: exit status: 1
-πŸ’‘ Use --no-verify to skip pre-merge commands
+πŸ’‘ To skip pre-merge commands, add --no-verify
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 38ef2fed1..22023b40b 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
@@ -7,6 +7,7 @@ info:
- feature
- "--force-delete"
env:
+ APPDATA: "[TEST_CONFIG_HOME]"
CLICOLOR_FORCE: "1"
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
@@ -14,10 +15,15 @@ info:
GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
GIT_CONFIG_SYSTEM: /dev/null
GIT_EDITOR: ""
+ GIT_TERMINAL_PROMPT: "0"
+ HOME: "[TEST_HOME]"
LANG: C
LC_ALL: C
+ PATH: "[PATH]"
SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: false
exit_code: 1
@@ -28,4 +34,4 @@ exit_code: 1
  exit 1
❌ pre-remove command failed: block: exit status: 1
-πŸ’‘ Use --no-verify to skip pre-remove commands
+πŸ’‘ To skip pre-remove commands, add --no-verify