Skip to content

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

feat: improve shell integration warning messages (#387)

Maximilian Roosca1065b5a305
diff --git a/.claude/rules/cli-output-formatting.md b/.claude/rules/cli-output-formatting.md
index 25ef735f2..171edd015 100644
--- a/.claude/rules/cli-output-formatting.md
+++ b/.claude/rules/cli-output-formatting.md
@@ -139,7 +139,6 @@ limitation and its reason:
```rust
// Outcome, but limitation — reason
"Worktree for feature @ ~/repo.feature, but cannot change directory — shell integration not installed"
-"Worktree for feature @ ~/repo.feature, but cannot change directory — shell requires restart"
```
This pattern:
@@ -147,6 +146,9 @@ This pattern:
- Uses "but" to introduce what didn't work (cannot cd)
- Uses em-dash to explain why (shell integration status)
+See `compute_shell_warning_reason()` in `src/output/handlers.rs` for the
+complete spec of shell integration warning messages and hints
+
**Compute decisions once:** For background operations, check conditions upfront,
show the message, then pass the decision explicitly rather than re-checking in
background scripts:
diff --git a/src/main.rs b/src/main.rs
index 3afbaf4c8..2feb37d7b 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -61,6 +61,18 @@ fn binary_name() -> String {
.unwrap_or_else(|| "wt".to_string())
}
+/// Check if we're running as a git subcommand (e.g., `git wt` instead of `git-wt`).
+///
+/// When git runs a subcommand like `git wt`, it sets `GIT_EXEC_PATH` in the environment.
+/// This is NOT set when running `git-wt` directly or via a shell function.
+///
+/// This distinction matters for shell integration: `git wt` runs as a subprocess of git,
+/// so even with shell integration configured, the `cd` directive cannot propagate to
+/// the parent shell. Users must use `git-wt` directly (via shell function) for automatic cd.
+fn is_git_subcommand() -> bool {
+ std::env::var_os("GIT_EXEC_PATH").is_some()
+}
+
/// Get the raw `argv[0]` value (how we were invoked).
///
/// Used in error messages to show what command was actually run.
diff --git a/src/output/handlers.rs b/src/output/handlers.rs
index 23f9a57ab..e41422b30 100644
--- a/src/output/handlers.rs
+++ b/src/output/handlers.rs
@@ -198,6 +198,11 @@ fn shell_integration_hint() -> String {
cformat!("To enable automatic cd, run <bright-black>wt config shell install</>")
}
+/// Hint when shell integration is installed but shell needs restart
+fn shell_restart_hint() -> &'static str {
+ "Restart shell to activate shell integration"
+}
+
/// Shell integration hint for unknown/unsupported shell
fn shell_integration_unsupported_shell(shell_path: &str) -> String {
// Extract shell name from path (e.g., "/bin/tcsh" -> "tcsh")
@@ -345,7 +350,7 @@ pub fn print_shell_install_result(
});
if current_shell_result.is_some() {
- super::print(hint_message("Restart shell to activate shell integration"))?;
+ super::print(hint_message(shell_restart_hint()))?;
}
}
@@ -396,6 +401,13 @@ pub fn prompt_shell_integration(
use std::io::IsTerminal;
use worktrunk::shell::current_shell;
+ // Skip when running as git subcommand - shell integration can't help there
+ // (running through git prevents cd, so the shell wrapper won't intercept)
+ // The git subcommand warning is already shown by the caller
+ if crate::is_git_subcommand() {
+ return Ok(false);
+ }
+
let is_tty = std::io::stdin().is_terminal() && std::io::stderr().is_terminal();
// Check the current shell (from $SHELL)
@@ -434,7 +446,7 @@ pub fn prompt_shell_integration(
// Shell integration is configured but not active for this invocation
if !crate::was_invoked_with_explicit_path() {
// Invoked via PATH but wrapper isn't active - needs shell restart
- super::print(hint_message("Restart shell to activate shell integration"))?;
+ super::print(hint_message(shell_restart_hint()))?;
}
// For explicit paths: no hint needed - handle_switch_output() warning already explains
return Ok(false);
@@ -473,20 +485,128 @@ pub fn prompt_shell_integration(
Ok(true)
}
-/// Show switch message when changing directory after worktree removal
+/// Warning message when running as git subcommand (cd cannot work)
+fn git_subcommand_warning() -> String {
+ cformat!("Use <bright-black>git-wt</> directly (via shell function) for automatic cd")
+}
+
+/// Show switch message when changing directory after worktree removal.
+///
+/// When shell integration is not active, warns that cd cannot happen.
+/// This is important for remove/merge since the user would be left in a deleted directory.
+///
+/// # Warning Message Format
+///
+/// Uses the standard "Cannot change directory — {reason}" pattern.
+/// See [`compute_shell_warning_reason`] for the full list of reasons.
fn print_switch_message_if_changed(
changed_directory: bool,
main_path: &Path,
) -> anyhow::Result<()> {
- if changed_directory && let Ok(Some(dest_branch)) = Repository::at(main_path).current_branch() {
- let path_display = format_path_for_display(main_path);
+ if !changed_directory {
+ return Ok(());
+ }
+
+ let repo = Repository::at(main_path);
+ let Ok(Some(dest_branch)) = repo.current_branch() else {
+ return Ok(());
+ };
+
+ let path_display = format_path_for_display(main_path);
+
+ if super::is_shell_integration_active() {
+ // Shell integration active - cd will work
super::print(info_message(cformat!(
"Switched to worktree for <bold>{dest_branch}</> @ <bold>{path_display}</>"
)))?;
+ } else if crate::is_git_subcommand() {
+ // Running as `git wt` - explain why cd can't work
+ super::print(warning_message(
+ "Cannot change directory — ran git wt; running through git prevents cd",
+ ))?;
+ super::print(hint_message(git_subcommand_warning()))?;
+ } else {
+ // Shell integration not active - compute specific reason
+ let reason = compute_shell_warning_reason();
+ super::print(warning_message(cformat!(
+ "Cannot change directory — {reason}"
+ )))?;
+ super::print(hint_message(shell_integration_hint()))?;
}
Ok(())
}
+/// Compute the shell warning reason for display in messages.
+///
+/// # Shell Integration Warning Messages (Complete Spec)
+///
+/// When shell integration is not active, warn that cd won't happen.
+///
+/// ## Switch to Existing Worktree (`wt switch X` where X exists)
+///
+/// | Condition | Warning | Hint |
+/// |-----------|---------|------|
+/// | Not installed | `▲ Worktree for X @ path, but cannot change directory — shell integration not installed` | `↳ To enable automatic cd, run wt config shell install` |
+/// | Needs restart | `▲ Worktree for X @ path, but cannot change directory — shell requires restart` | `↳ Restart shell to activate shell integration` |
+/// | Explicit path | `▲ Worktree for X @ path, but cannot change directory — ran ./wt; shell integration wraps wt` | (none) |
+/// | Git subcommand | `▲ Worktree for X @ path, but cannot change directory — ran git wt; running through git prevents cd` | `↳ Use git-wt directly (via shell function) for automatic cd` |
+///
+/// ## After Merge/Remove (switching to main worktree)
+///
+/// | Condition | Warning | Hint |
+/// |-----------|---------|------|
+/// | Git subcommand | `▲ Cannot change directory — ran git wt; running through git prevents cd` | `↳ Use git-wt directly (via shell function) for automatic cd` |
+/// | Other | `▲ Cannot change directory — {reason}` | `↳ To enable automatic cd, run wt config shell install` |
+///
+/// ## Success Case (shell integration active)
+///
+/// ```text
+/// ○ Switched to worktree for X @ path
+/// ```
+///
+/// # Reason Values (returned by this function)
+///
+/// | Reason | Meaning |
+/// |--------|---------|
+/// | `shell integration not installed` | Shell config doesn't have the `eval` line |
+/// | `shell requires restart` | Shell config has `eval` line but wrapper not active |
+/// | `ran X; shell integration wraps Y` | Invoked with explicit path (e.g., `./target/debug/wt`) |
+///
+/// Note: The git subcommand case (`ran git wt; ...`) is handled separately via `is_git_subcommand()`.
+fn compute_shell_warning_reason() -> String {
+ use worktrunk::shell::Shell;
+
+ let is_configured = Shell::is_integration_configured(&crate::binary_name())
+ .ok()
+ .flatten()
+ .is_some();
+ let explicit_path = crate::was_invoked_with_explicit_path();
+ let invoked = crate::invocation_path();
+ let wraps = crate::binary_name();
+
+ compute_shell_warning_reason_inner(is_configured, explicit_path, &invoked, &wraps)
+}
+
+/// Inner logic for computing shell warning reason.
+/// Separated for testability - the outer function handles environment queries.
+fn compute_shell_warning_reason_inner(
+ is_configured: bool,
+ explicit_path: bool,
+ invoked: &str,
+ wraps: &str,
+) -> String {
+ if is_configured {
+ if explicit_path {
+ // Invoked with explicit path - shell wrapper won't intercept this binary
+ cformat!("ran <bold>{invoked}</>; shell integration wraps <bold>{wraps}</>")
+ } else {
+ "shell requires restart".to_string()
+ }
+ } else {
+ "shell integration not installed".to_string()
+ }
+}
+
/// Handle output for a switch operation
///
/// # Shell Integration Warnings
@@ -501,9 +621,9 @@ fn print_switch_message_if_changed(
/// - `AlreadyAt` — user is already in the target directory
/// - Shell integration IS active — cd will happen automatically
///
-/// **Warning reasons:**
-/// - "shell requires restart" — shell config has `eval` line but wrapper not active
-/// - "shell integration not installed" — shell config doesn't have `eval` line
+/// **Warning format:** `Cannot change directory — {reason}`
+///
+/// See [`compute_shell_warning_reason`] for the full list of reasons.
///
/// **Message order for Created:** Success message first, then warning. Creation
/// is a real accomplishment, but users still need to know they won't cd there.
@@ -532,25 +652,14 @@ pub fn handle_switch_output(
let is_shell_integration_active = super::is_shell_integration_active();
// Compute shell warning reason once (only if we'll need it)
+ // Git subcommand case is special — needs a hint after the warning
+ let is_git_subcommand = crate::is_git_subcommand();
let shell_warning_reason: Option<String> = if is_shell_integration_active {
None
- } else if Shell::is_integration_configured(&crate::binary_name())
- .ok()
- .flatten()
- .is_some()
- {
- if crate::was_invoked_with_explicit_path() {
- // Invoked with explicit path - shell wrapper won't intercept this binary
- let invoked = crate::invocation_path();
- let wraps = crate::binary_name();
- Some(cformat!(
- "ran <bold>{invoked}</>; shell integration wraps <bold>{wraps}</>"
- ))
- } else {
- Some("shell requires restart".to_string())
- }
+ } else if is_git_subcommand {
+ Some("ran git wt; running through git prevents cd".to_string())
} else {
- Some("shell integration not installed".to_string())
+ Some(compute_shell_warning_reason())
};
// Show path mismatch warning after the main message
@@ -575,25 +684,29 @@ pub fn handle_switch_output(
}
SwitchResult::Existing(_) => {
if let Some(reason) = &shell_warning_reason {
- // Shell integration not active — warn that shell won't cd
+ // Shell integration not active — single warning with context
+ if let Some(warning) = path_mismatch_warning {
+ super::print(warning)?;
+ }
if let Some(cmd) = execute_command {
- // --execute: command will run in target dir, but shell stays put
+ // --execute: command runs in target dir, but shell stays put
super::print(warning_message(cformat!(
"Executing <bold>{cmd}</> @ <bold>{path_display}</>, but shell directory unchanged — {reason}"
)))?;
} else {
- // No --execute: user expected to cd but won't
+ // No --execute: what exists + why cd won't happen
super::print(warning_message(cformat!(
"Worktree for <bold>{branch}</> @ <bold>{path_display}</>, but cannot change directory — {reason}"
)))?;
}
- if let Some(warning) = path_mismatch_warning {
- super::print(warning)?;
+ // Show git subcommand hint if running as git wt
+ if is_git_subcommand {
+ super::print(hint_message(git_subcommand_warning()))?;
}
// User won't be there - show path in hook announcements
Some(path.clone())
} else {
- // Shell integration active — cd will happen automatically
+ // Shell integration active — user actually switched
super::print(info_message(format_switch_message(
branch, path, false, None, None,
)))?;
@@ -631,6 +744,10 @@ pub fn handle_switch_output(
"Cannot change directory — {reason}"
)))?;
}
+ // Show git subcommand hint if running as git wt
+ if is_git_subcommand {
+ super::print(hint_message(git_subcommand_warning()))?;
+ }
// User won't be there - show path in hook announcements
Some(path.clone())
} else {
@@ -1192,4 +1309,33 @@ mod tests {
let hint = shell_integration_hint();
assert!(hint.contains("wt config shell install"));
}
+
+ #[test]
+ fn test_git_subcommand_warning() {
+ let warning = git_subcommand_warning();
+ assert!(warning.contains("git-wt"));
+ assert!(warning.contains("shell function"));
+ }
+
+ #[test]
+ fn test_compute_shell_warning_reason_not_installed() {
+ // Shell integration not configured -> "not installed"
+ let reason = compute_shell_warning_reason_inner(false, false, "wt", "wt");
+ assert_eq!(reason, "shell integration not installed");
+ }
+
+ #[test]
+ fn test_compute_shell_warning_reason_explicit_path() {
+ // Shell integration configured + explicit path -> "ran X; wraps Y"
+ let reason = compute_shell_warning_reason_inner(true, true, "./target/debug/wt", "wt");
+ assert!(reason.contains("./target/debug/wt"));
+ assert!(reason.contains("wt"));
+ }
+
+ #[test]
+ fn test_compute_shell_warning_reason_needs_restart() {
+ // Shell integration configured + NOT explicit path -> "shell requires restart"
+ let reason = compute_shell_warning_reason_inner(true, false, "wt", "wt");
+ assert_eq!(reason, "shell requires restart");
+ }
}
diff --git a/tests/integration_tests/merge.rs b/tests/integration_tests/merge.rs
index 23019dd5c..d065a6918 100644
--- a/tests/integration_tests/merge.rs
+++ b/tests/integration_tests/merge.rs
@@ -52,6 +52,25 @@ fn test_merge_fast_forward(merge_scenario: (TestRepo, PathBuf)) {
snapshot_merge("merge_fast_forward", &repo, &["main"], Some(&feature_wt));
}
+/// Test merge when running as a git subcommand (`git wt merge` instead of `wt merge`).
+///
+/// When git runs a subcommand, it sets `GIT_EXEC_PATH` in the environment.
+/// Shell integration cannot work in this case because cd directives cannot
+/// propagate through git's subprocess to the parent shell.
+#[rstest]
+fn test_merge_as_git_subcommand(merge_scenario: (TestRepo, PathBuf)) {
+ let (repo, feature_wt) = merge_scenario;
+
+ // Merge with GIT_EXEC_PATH set (simulating `git wt merge ...`)
+ snapshot_merge_with_env(
+ "merge_as_git_subcommand",
+ &repo,
+ &["main"],
+ Some(&feature_wt),
+ &[("GIT_EXEC_PATH", "/usr/lib/git-core")],
+ );
+}
+
#[rstest]
fn test_merge_when_primary_not_on_default_but_default_has_worktree(
mut repo_with_alternate_primary: TestRepo,
diff --git a/tests/integration_tests/remove.rs b/tests/integration_tests/remove.rs
index de4e45cdb..281ca5dc7 100644
--- a/tests/integration_tests/remove.rs
+++ b/tests/integration_tests/remove.rs
@@ -75,6 +75,24 @@ fn test_remove_internal_mode(mut repo: TestRepo) {
snapshot_remove_with_directive_file("remove_internal_mode", &repo, &[], Some(&worktree_path));
}
+/// Test remove when running as a git subcommand (`git wt remove` instead of `wt remove`).
+///
+/// When git runs a subcommand, it sets `GIT_EXEC_PATH` in the environment.
+/// Shell integration cannot work in this case because cd directives cannot
+/// propagate through git's subprocess to the parent shell.
+#[rstest]
+fn test_remove_as_git_subcommand(mut repo: TestRepo) {
+ let worktree_path = repo.add_worktree("feature-git-subcmd");
+
+ // Remove with GIT_EXEC_PATH set (simulating `git wt remove ...`)
+ let settings = setup_snapshot_settings(&repo);
+ settings.bind(|| {
+ let mut cmd = make_snapshot_cmd(&repo, "remove", &[], Some(&worktree_path));
+ cmd.env("GIT_EXEC_PATH", "/usr/lib/git-core");
+ assert_cmd_snapshot!("remove_as_git_subcommand", cmd);
+ });
+}
+
#[rstest]
fn test_remove_dirty_working_tree(repo: TestRepo) {
// Create a dirty file
diff --git a/tests/integration_tests/switch.rs b/tests/integration_tests/switch.rs
index 8a888f6e4..5968ca346 100644
--- a/tests/integration_tests/switch.rs
+++ b/tests/integration_tests/switch.rs
@@ -135,6 +135,25 @@ fn test_switch_existing_with_shell_integration_configured(mut repo: TestRepo) {
);
}
+/// Test switching when running as a git subcommand (`git wt` instead of `git-wt`).
+///
+/// When git runs a subcommand, it sets `GIT_EXEC_PATH` in the environment.
+/// Shell integration cannot work in this case because cd directives cannot
+/// propagate through git's subprocess to the parent shell.
+#[rstest]
+fn test_switch_existing_as_git_subcommand(mut repo: TestRepo) {
+ // Create a worktree first
+ repo.add_worktree("git-subcommand-test");
+
+ // Switch with GIT_EXEC_PATH set (simulating `git wt switch ...`)
+ let settings = setup_snapshot_settings(&repo);
+ settings.bind(|| {
+ let mut cmd = make_snapshot_cmd(&repo, "switch", &["git-subcommand-test"], None);
+ cmd.env("GIT_EXEC_PATH", "/usr/lib/git-core");
+ assert_cmd_snapshot!("switch_as_git_subcommand", cmd);
+ });
+}
+
#[rstest]
fn test_switch_with_base_branch(repo: TestRepo) {
repo.commit("Initial commit on main");
diff --git a/tests/snapshots/integration__integration_tests__directives__switch_directive_file.snap b/tests/snapshots/integration__integration_tests__directives__switch_directive_file.snap
index 8764c7470..f87db0baa 100644
--- a/tests/snapshots/integration__integration_tests__directives__switch_directive_file.snap
+++ b/tests/snapshots/integration__integration_tests__directives__switch_directive_file.snap
@@ -23,7 +23,8 @@ info:
SOURCE_DATE_EPOCH: "1735776000"
USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
- WORKTRUNK_DIRECTIVE_FILE: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpNSbcF7
+ WORKTRUNK_DIRECTIVE_FILE: "[DIRECTIVE_FILE]"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: true
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_as_git_subcommand.snap b/tests/snapshots/integration__integration_tests__merge__merge_as_git_subcommand.snap
new file mode 100644
index 000000000..cccde9539
--- /dev/null
+++ b/tests/snapshots/integration__integration_tests__merge__merge_as_git_subcommand.snap
@@ -0,0 +1,42 @@
+---
+source: tests/integration_tests/merge.rs
+info:
+ program: wt
+ args:
+ - merge
+ - main
+ env:
+ APPDATA: "[TEST_CONFIG_HOME]"
+ 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: ""
+ GIT_EXEC_PATH: /usr/lib/git-core
+ GIT_TERMINAL_PROMPT: "0"
+ HOME: "[TEST_HOME]"
+ LANG: C
+ LC_ALL: C
+ PATH: "[PATH]"
+ RUST_LOG: warn
+ SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
+---
+success: true
+exit_code: 0
+----- stdout -----
+
+----- stderr -----
+◎ Merging 1 commit to main @ fc12499 (no commit/squash/rebase needed)
+  * fc12499 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 (same commit as main, _)
+▲ Cannot change directory — ran git wt; running through git prevents cd
+↳ Use git-wt directly (via shell function) for automatic cd
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_auto_commit_and_squash.snap b/tests/snapshots/integration__integration_tests__merge__merge_auto_commit_and_squash.snap
index 665cb5926..24a1a2c9d 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_auto_commit_and_squash.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_auto_commit_and_squash.snap
@@ -23,6 +23,7 @@ info:
SOURCE_DATE_EPOCH: "1735776000"
USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: true
@@ -42,4 +43,5 @@ exit_code: 0
  2 files changed, 2 insertions(+)
✓ Merged to main (1 commit, 2 files, +2)
◎ Removing feature worktree & branch in background (same commit as main, _)
-○ Switched to worktree for main @ _REPO_
+▲ Cannot change directory — shell integration not installed
+↳ To enable automatic cd, run wt config shell install
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_auto_commit_deterministic.snap b/tests/snapshots/integration__integration_tests__merge__merge_auto_commit_deterministic.snap
index 3a3361e16..9132efa7c 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_auto_commit_deterministic.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_auto_commit_deterministic.snap
@@ -23,6 +23,7 @@ info:
SOURCE_DATE_EPOCH: "1735776000"
USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: true
@@ -45,4 +46,5 @@ exit_code: 0
  1 file changed, 1 insertion(+)
✓ Merged to main (1 commit, 1 file, +1)
◎ Removing feature worktree & branch in background (same commit as main, _)
-○ Switched to worktree for main @ _REPO_
+▲ Cannot change directory — shell integration not installed
+↳ To enable automatic cd, run wt config shell install
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_auto_commit_with_llm.snap b/tests/snapshots/integration__integration_tests__merge__merge_auto_commit_with_llm.snap
index 310e6d698..f5055cfe4 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_auto_commit_with_llm.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_auto_commit_with_llm.snap
@@ -23,6 +23,7 @@ info:
SOURCE_DATE_EPOCH: "1735776000"
USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: true
@@ -41,4 +42,5 @@ exit_code: 0
  1 file changed, 1 insertion(+)
✓ Merged to main (1 commit, 1 file, +1)
◎ Removing feature worktree & branch in background (same commit as main, _)
-○ Switched to worktree for main @ _REPO_
+▲ Cannot change directory — shell integration not installed
+↳ To enable automatic cd, run wt config shell install
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_dirty_working_tree.snap b/tests/snapshots/integration__integration_tests__merge__merge_dirty_working_tree.snap
index adb783e3d..09e37d29e 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_dirty_working_tree.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_dirty_working_tree.snap
@@ -23,6 +23,7 @@ info:
SOURCE_DATE_EPOCH: "1735776000"
USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: true
@@ -42,4 +43,5 @@ exit_code: 0
  1 file changed, 1 insertion(+)
✓ Merged to main (1 commit, 1 file, +1)
◎ Removing feature worktree & branch in background (same commit as main, _)
-○ Switched to worktree for main @ _REPO_
+▲ Cannot change directory — shell integration not installed
+↳ To enable automatic cd, run wt config shell install
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_fast_forward.snap b/tests/snapshots/integration__integration_tests__merge__merge_fast_forward.snap
index d752f3b07..28df19778 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_fast_forward.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_fast_forward.snap
@@ -23,6 +23,7 @@ info:
SOURCE_DATE_EPOCH: "1735776000"
USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: true
@@ -36,4 +37,5 @@ exit_code: 0
  1 file changed, 1 insertion(+)
✓ Merged to main (1 commit, 1 file, +1)
◎ Removing feature worktree & branch in background (same commit as main, _)
-○ Switched to worktree for main @ _REPO_
+▲ Cannot change directory — shell integration not installed
+↳ To enable automatic cd, run wt config shell install
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_no_commits.snap b/tests/snapshots/integration__integration_tests__merge__merge_no_commits.snap
index 87f7be233..71066792f 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_no_commits.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_no_commits.snap
@@ -23,6 +23,7 @@ info:
SOURCE_DATE_EPOCH: "1735776000"
USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: true
@@ -32,4 +33,5 @@ exit_code: 0
----- stderr -----
○ Already up to date with main (no new commits, no rebase needed)
◎ Removing no-commits worktree & branch in background (same commit as main, _)
-○ Switched to worktree for main @ _REPO_
+▲ Cannot change directory — shell integration not installed
+↳ To enable automatic cd, run wt config shell install
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_no_commits_with_changes.snap b/tests/snapshots/integration__integration_tests__merge__merge_no_commits_with_changes.snap
index 81ea04516..17f098742 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_no_commits_with_changes.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_no_commits_with_changes.snap
@@ -23,6 +23,7 @@ info:
SOURCE_DATE_EPOCH: "1735776000"
USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: true
@@ -42,4 +43,5 @@ exit_code: 0
  1 file changed, 1 insertion(+)
✓ Merged to main (1 commit, 1 file, +1)
◎ Removing no-commits-dirty worktree & branch in background (same commit as main, _)
-○ Switched to worktree for main @ _REPO_
+▲ Cannot change directory — shell integration not installed
+↳ To enable automatic cd, run wt config shell install
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_no_rebase_already_rebased.snap b/tests/snapshots/integration__integration_tests__merge__merge_no_rebase_already_rebased.snap
index b1a691c88..0d3301d3b 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_no_rebase_already_rebased.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_no_rebase_already_rebased.snap
@@ -24,6 +24,7 @@ info:
SOURCE_DATE_EPOCH: "1735776000"
USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: true
@@ -37,4 +38,5 @@ exit_code: 0
  1 file changed, 1 insertion(+)
✓ Merged to main (1 commit, 1 file, +1)
◎ Removing feature worktree & branch in background (same commit as main, _)
-○ Switched to worktree for main @ _REPO_
+▲ Cannot change directory — shell integration not installed
+↳ To enable automatic cd, run wt config shell install
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_no_remote.snap b/tests/snapshots/integration__integration_tests__merge__merge_no_remote.snap
index 1aafeccb8..957add793 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_no_remote.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_no_remote.snap
@@ -22,6 +22,7 @@ info:
SOURCE_DATE_EPOCH: "1735776000"
USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: true
@@ -35,4 +36,5 @@ exit_code: 0
  1 file changed, 1 insertion(+)
✓ Merged to main (1 commit, 1 file, +1)
◎ Removing feature worktree & branch in background (same commit as main, _)
-○ Switched to worktree for main @ _REPO_
+▲ Cannot change directory — shell integration not installed
+↳ To enable automatic cd, run wt config shell install
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_no_squash.snap b/tests/snapshots/integration__integration_tests__merge__merge_no_squash.snap
index 9232f96e4..9fab30bcd 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_no_squash.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_no_squash.snap
@@ -24,6 +24,7 @@ info:
SOURCE_DATE_EPOCH: "1735776000"
USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: true
@@ -39,4 +40,5 @@ exit_code: 0
  2 files changed, 2 insertions(+)
✓ Merged to main (2 commits, 2 files, +2)
◎ Removing feature worktree & branch in background (same commit as main, _)
-○ Switched to worktree for main @ _REPO_
+▲ Cannot change directory — shell integration not installed
+↳ To enable automatic cd, run wt config shell install
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_not_fast_forward.snap b/tests/snapshots/integration__integration_tests__merge__merge_not_fast_forward.snap
index b306654e0..5f9a5189c 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_not_fast_forward.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_not_fast_forward.snap
@@ -23,6 +23,7 @@ info:
SOURCE_DATE_EPOCH: "1735776000"
USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: true
@@ -36,4 +37,5 @@ exit_code: 0
  1 file changed, 1 insertion(+)
✓ Merged to main (1 commit, 1 file, +1)
◎ Removing feature worktree & branch in background (same commit as main, _)
-○ Switched to worktree for main @ _REPO_
+▲ Cannot change directory — shell integration not installed
+↳ To enable automatic cd, run wt config shell install
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 c6b040609..907ce77ec 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
@@ -38,7 +38,8 @@ exit_code: 1
  1 file changed, 1 insertion(+)
✓ Merged to main (1 commit, 1 file, +1)
◎ Removing feature worktree & branch in background (same commit as main, _)
-○ Switched to worktree for main @ _REPO_
+▲ Cannot change directory — shell integration not installed
+↳ To enable automatic cd, run wt config shell install
◎ Running post-merge project hook @ _REPO_:
  exit 1
▲ 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 597b72765..3e37f0a09 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
@@ -38,7 +38,8 @@ exit_code: 0
  1 file changed, 1 insertion(+)
✓ Merged to main (1 commit, 1 file, +1)
◎ Removing feature worktree & branch in background (same commit as main, _)
-○ Switched to worktree for main @ _REPO_
+▲ Cannot change directory — shell integration not installed
+↳ To enable automatic cd, run wt config shell install
◎ Running post-merge project:notify @ _REPO_:
  echo 'Merge to main complete' > notify.txt
◎ Running post-merge project:deploy @ _REPO_:
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_no_verify.snap b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_no_verify.snap
index 58fb7d3b9..105ab216c 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_no_verify.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_no_verify.snap
@@ -25,6 +25,7 @@ info:
SOURCE_DATE_EPOCH: "1735776000"
USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: true
@@ -38,4 +39,5 @@ exit_code: 0
  1 file changed, 1 insertion(+)
✓ Merged to main (1 commit, 1 file, +1)
◎ Removing feature worktree & branch in background (same commit as main, _)
-○ Switched to worktree for main @ _REPO_
+▲ Cannot change directory — shell integration not installed
+↳ To enable automatic cd, run wt config shell install
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 c298b2136..a7c2c71ec 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
@@ -38,6 +38,7 @@ exit_code: 0
  1 file changed, 1 insertion(+)
✓ Merged to main (1 commit, 1 file, +1)
◎ Removing feature worktree & branch in background (same commit as main, _)
-○ Switched to worktree for main @ _REPO_
+▲ Cannot change directory — shell integration not installed
+↳ To enable automatic cd, run wt config shell install
◎ Running post-merge project hook @ _REPO_:
  echo 'merged feature to 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 ff8b05a39..7a09e6e4f 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
@@ -34,6 +34,7 @@ exit_code: 0
----- stderr -----
○ Already up to date with main (no new commits, no rebase needed)
◎ Removing feature worktree & branch in background (same commit as main, _)
-○ Switched to worktree for main @ _REPO_
+▲ Cannot change directory — shell integration not installed
+↳ To enable automatic cd, run wt config shell install
◎ Running post-merge project hook @ _REPO_:
  echo 'post-merge ran' > post-merge-ran.txt
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 62e9daf12..743558139 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
@@ -24,6 +24,7 @@ info:
SOURCE_DATE_EPOCH: "1735776000"
USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: true
@@ -46,4 +47,5 @@ exit_code: 0
  1 file changed, 1 insertion(+)
✓ Merged to main (1 commit, 1 file, +1)
◎ Removing feature worktree & branch in background (same commit as main, _)
-○ Switched to worktree for main @ _REPO_
+▲ Cannot change directory — shell integration not installed
+↳ To enable automatic cd, run wt config shell install
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 f2adae216..4018ef32e 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
@@ -24,6 +24,7 @@ info:
SOURCE_DATE_EPOCH: "1735776000"
USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: true
@@ -43,4 +44,5 @@ exit_code: 0
  1 file changed, 1 insertion(+)
✓ Merged to main (1 commit, 1 file, +1)
◎ Removing feature worktree & branch in background (same commit as main, _)
-○ Switched to worktree for main @ _REPO_
+▲ Cannot change directory — shell integration not installed
+↳ To enable automatic cd, run wt config shell install
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_no_hooks.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_no_hooks.snap
index e1ffa307b..8bb7c5588 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_no_hooks.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_no_hooks.snap
@@ -24,6 +24,7 @@ info:
SOURCE_DATE_EPOCH: "1735776000"
USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: true
@@ -37,4 +38,5 @@ exit_code: 0
  1 file changed, 1 insertion(+)
✓ Merged to main (1 commit, 1 file, +1)
◎ Removing feature worktree & branch in background (same commit as main, _)
-○ Switched to worktree for main @ _REPO_
+▲ Cannot change directory — shell integration not installed
+↳ To enable automatic cd, run wt config shell install
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 08afbbf80..170a61ef3 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
@@ -24,6 +24,7 @@ info:
SOURCE_DATE_EPOCH: "1735776000"
USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: true
@@ -39,4 +40,5 @@ exit_code: 0
  1 file changed, 1 insertion(+)
✓ Merged to main (1 commit, 1 file, +1)
◎ Removing feature worktree & branch in background (same commit as main, _)
-○ Switched to worktree for main @ _REPO_
+▲ Cannot change directory — shell integration not installed
+↳ To enable automatic cd, run wt config shell install
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 0bdebe12f..93612c6c9 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
@@ -24,6 +24,7 @@ info:
SOURCE_DATE_EPOCH: "1735776000"
USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: true
@@ -40,4 +41,5 @@ exit_code: 0
  1 file changed, 1 insertion(+)
✓ Merged to main (1 commit, 1 file, +1)
◎ Removing feature worktree & branch in background (same commit as main, _)
-○ Switched to worktree for main @ _REPO_
+▲ Cannot change directory — shell integration not installed
+↳ To enable automatic cd, run wt config shell install
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_primary_on_different_branch.snap b/tests/snapshots/integration__integration_tests__merge__merge_primary_on_different_branch.snap
index 2b007af1a..08b06be6c 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_primary_on_different_branch.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_primary_on_different_branch.snap
@@ -23,6 +23,7 @@ info:
SOURCE_DATE_EPOCH: "1735776000"
USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: true
@@ -36,4 +37,5 @@ exit_code: 0
  1 file changed, 1 insertion(+)
✓ Merged to main (1 commit, 1 file, +1)
◎ Removing feature-from-develop worktree & branch in background (same commit as main, _)
-○ Switched to worktree for develop @ _REPO_
+▲ Cannot change directory — shell integration not installed
+↳ To enable automatic cd, run wt config shell install
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_primary_on_different_branch_dirty.snap b/tests/snapshots/integration__integration_tests__merge__merge_primary_on_different_branch_dirty.snap
index 61971b9b6..6dbd32024 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_primary_on_different_branch_dirty.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_primary_on_different_branch_dirty.snap
@@ -23,6 +23,7 @@ info:
SOURCE_DATE_EPOCH: "1735776000"
USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: true
@@ -38,4 +39,5 @@ exit_code: 0
  1 file changed, 1 insertion(+)
✓ Merged to main (1 commit, 1 file, +1)
◎ Removing feature-dirty-primary worktree & branch in background (same commit as main, _)
-○ Switched to worktree for develop @ _REPO_
+▲ Cannot change directory — shell integration not installed
+↳ To enable automatic cd, run wt config shell install
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_rebase_fast_forward.snap b/tests/snapshots/integration__integration_tests__merge__merge_rebase_fast_forward.snap
index dfb3daa2c..ba9e3e069 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_rebase_fast_forward.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_rebase_fast_forward.snap
@@ -23,6 +23,7 @@ info:
SOURCE_DATE_EPOCH: "1735776000"
USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: true
@@ -33,4 +34,5 @@ exit_code: 0
✓ Fast-forwarded to main
○ Already up to date with main (no new commits)
◎ Removing fast-forward-test worktree & branch in background (same commit as main, _)
-○ Switched to worktree for main @ _REPO_
+▲ Cannot change directory — shell integration not installed
+↳ To enable automatic cd, run wt config shell install
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_rebase_true_rebase.snap b/tests/snapshots/integration__integration_tests__merge__merge_rebase_true_rebase.snap
index 8b3bb6fd4..6aee4ba0b 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_rebase_true_rebase.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_rebase_true_rebase.snap
@@ -23,6 +23,7 @@ info:
SOURCE_DATE_EPOCH: "1735776000"
USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: true
@@ -38,4 +39,5 @@ exit_code: 0
  1 file changed, 1 insertion(+)
✓ Merged to main (1 commit, 1 file, +1)
◎ Removing true-rebase-test worktree & branch in background (same commit as main, _)
-○ Switched to worktree for main @ _REPO_
+▲ Cannot change directory — shell integration not installed
+↳ To enable automatic cd, run wt config shell install
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_squash_deterministic.snap b/tests/snapshots/integration__integration_tests__merge__merge_squash_deterministic.snap
index 9df25545f..caaba4f07 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_squash_deterministic.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_squash_deterministic.snap
@@ -23,6 +23,7 @@ info:
SOURCE_DATE_EPOCH: "1735776000"
USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: true
@@ -48,4 +49,5 @@ exit_code: 0
  3 files changed, 3 insertions(+)
✓ Merged to main (1 commit, 3 files, +3)
◎ Removing feature worktree & branch in background (same commit as main, _)
-○ Switched to worktree for main @ _REPO_
+▲ Cannot change directory — shell integration not installed
+↳ To enable automatic cd, run wt config shell install
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_squash_empty_changes.snap b/tests/snapshots/integration__integration_tests__merge__merge_squash_empty_changes.snap
index 42a078260..65ff15a2f 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_squash_empty_changes.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_squash_empty_changes.snap
@@ -23,6 +23,7 @@ info:
SOURCE_DATE_EPOCH: "1735776000"
USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: true
@@ -42,4 +43,5 @@ exit_code: 0
○ No changes after squashing 3 commits
○ Already up to date with main (no new commits, no rebase needed)
◎ Removing feature worktree & branch in background (same commit as main, _)
-○ Switched to worktree for main @ _REPO_
+▲ Cannot change directory — shell integration not installed
+↳ To enable automatic cd, run wt config shell install
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_squash_single_commit.snap b/tests/snapshots/integration__integration_tests__merge__merge_squash_single_commit.snap
index 455ddf614..5157dd27b 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_squash_single_commit.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_squash_single_commit.snap
@@ -23,6 +23,7 @@ info:
SOURCE_DATE_EPOCH: "1735776000"
USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: true
@@ -36,4 +37,5 @@ exit_code: 0
  1 file changed, 1 insertion(+)
✓ Merged to main (1 commit, 1 file, +1)
◎ Removing feature worktree & branch in background (same commit as main, _)
-○ Switched to worktree for main @ _REPO_
+▲ Cannot change directory — shell integration not installed
+↳ To enable automatic cd, run wt config shell install
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_squash_with_llm.snap b/tests/snapshots/integration__integration_tests__merge__merge_squash_with_llm.snap
index 1c8cd2b67..955f44221 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_squash_with_llm.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_squash_with_llm.snap
@@ -23,6 +23,7 @@ info:
SOURCE_DATE_EPOCH: "1735776000"
USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: true
@@ -40,4 +41,5 @@ exit_code: 0
  1 file changed, 1 insertion(+)
✓ Merged to main (1 commit, 1 file, +1)
◎ Removing feature worktree & branch in background (same commit as main, _)
-○ Switched to worktree for main @ _REPO_
+▲ Cannot change directory — shell integration not installed
+↳ To enable automatic cd, run wt config shell install
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_squash_with_working_tree_creates_backup.snap b/tests/snapshots/integration__integration_tests__merge__merge_squash_with_working_tree_creates_backup.snap
index 2ee82152d..5a77936ce 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_squash_with_working_tree_creates_backup.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_squash_with_working_tree_creates_backup.snap
@@ -25,6 +25,7 @@ info:
WORKTRUNK_COMMIT_GENERATION__ARGS: "fix: update files"
WORKTRUNK_COMMIT_GENERATION__COMMAND: echo
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: true
@@ -44,4 +45,5 @@ exit_code: 0
  2 files changed, 2 insertions(+)
✓ Merged to main (1 commit, 2 files, +2)
◎ Removing feature worktree & branch in background (same commit as main, _)
-○ Switched to worktree for main @ _REPO_
+▲ Cannot change directory — shell integration not installed
+↳ To enable automatic cd, run wt config shell install
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_to_default.snap b/tests/snapshots/integration__integration_tests__merge__merge_to_default.snap
index 1aafeccb8..957add793 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_to_default.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_to_default.snap
@@ -22,6 +22,7 @@ info:
SOURCE_DATE_EPOCH: "1735776000"
USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: true
@@ -35,4 +36,5 @@ exit_code: 0
  1 file changed, 1 insertion(+)
✓ Merged to main (1 commit, 1 file, +1)
◎ Removing feature worktree & branch in background (same commit as main, _)
-○ Switched to worktree for main @ _REPO_
+▲ Cannot change directory — shell integration not installed
+↳ To enable automatic cd, run wt config shell install
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_to_non_default_target.snap b/tests/snapshots/integration__integration_tests__merge__merge_to_non_default_target.snap
index 929686a43..3e3f525da 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_to_non_default_target.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_to_non_default_target.snap
@@ -23,6 +23,7 @@ info:
SOURCE_DATE_EPOCH: "1735776000"
USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: true
@@ -38,4 +39,5 @@ exit_code: 0
  1 file changed, 1 insertion(+)
✓ Merged to staging (1 commit, 1 file, +1)
◎ Removing feature-for-staging worktree & branch in background (same commit as staging, _)
-○ Switched to worktree for staging @ _REPO_.staging-wt
+▲ Cannot change directory — shell integration not installed
+↳ To enable automatic cd, run wt config shell install
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_when_primary_not_on_default_but_default_has_worktree.snap b/tests/snapshots/integration__integration_tests__merge__merge_when_primary_not_on_default_but_default_has_worktree.snap
index 15d1802fa..28df19778 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_when_primary_not_on_default_but_default_has_worktree.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_when_primary_not_on_default_but_default_has_worktree.snap
@@ -23,6 +23,7 @@ info:
SOURCE_DATE_EPOCH: "1735776000"
USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: true
@@ -36,4 +37,5 @@ exit_code: 0
  1 file changed, 1 insertion(+)
✓ Merged to main (1 commit, 1 file, +1)
◎ Removing feature worktree & branch in background (same commit as main, _)
-○ Switched to worktree for main @ _REPO_.main-wt
+▲ Cannot change directory — shell integration not installed
+↳ To enable automatic cd, run wt config shell install
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_with_caret.snap b/tests/snapshots/integration__integration_tests__merge__merge_with_caret.snap
index f75f52b5f..cea00dcc3 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_with_caret.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_with_caret.snap
@@ -23,6 +23,7 @@ info:
SOURCE_DATE_EPOCH: "1735776000"
USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: true
@@ -36,4 +37,5 @@ exit_code: 0
  1 file changed, 1 insertion(+)
✓ Merged to main (1 commit, 1 file, +1)
◎ Removing feature worktree & branch in background (same commit as main, _)
-○ Switched to worktree for main @ _REPO_
+▲ Cannot change directory — shell integration not installed
+↳ To enable automatic cd, run wt config shell install
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_with_untracked_files.snap b/tests/snapshots/integration__integration_tests__merge__merge_with_untracked_files.snap
index e6722905c..d39564602 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_with_untracked_files.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_with_untracked_files.snap
@@ -25,6 +25,7 @@ info:
WORKTRUNK_COMMIT_GENERATION__ARGS: "fix: commit changes"
WORKTRUNK_COMMIT_GENERATION__COMMAND: echo
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: true
@@ -48,4 +49,5 @@ exit_code: 0
  3 files changed, 3 insertions(+)
✓ Merged to main (1 commit, 3 files, +3)
◎ Removing feature worktree & branch in background (same commit as main, _)
-○ Switched to worktree for main @ _REPO_
+▲ Cannot change directory — shell integration not installed
+↳ To enable automatic cd, run wt config shell install
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 cc917544b..734f8c3f8 100644
--- a/tests/snapshots/integration__integration_tests__merge__readme_example_complex.snap
+++ b/tests/snapshots/integration__integration_tests__merge__readme_example_complex.snap
@@ -68,7 +68,8 @@ test result: ok. 18 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; fin
  3 files changed, 33 insertions(+)
✓ Merged to main (1 commit, 3 files, +33)
◎ Removing feature-auth worktree & branch in background (same commit as main, _)
-○ Switched to worktree for main @ _REPO_
+▲ Cannot change directory — shell integration not installed
+↳ To enable automatic cd, run wt config shell install
◎ Running post-merge project:install @ _REPO_:
  cargo install --path .
 Installing worktrunk v0.1.0
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 de45bc842..9d306479b 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
@@ -24,6 +24,7 @@ info:
SOURCE_DATE_EPOCH: "1735776000"
USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: true
@@ -62,4 +63,5 @@ All checks passed!
  2 files changed, 45 insertions(+)
✓ Merged to main (1 commit, 2 files, +45)
◎ Removing feature-auth worktree & branch in background (same commit as main, _)
-○ Switched to worktree for main @ _REPO_
+▲ Cannot change directory — shell integration not installed
+↳ To enable automatic cd, run wt config shell install
diff --git a/tests/snapshots/integration__integration_tests__merge__readme_example_simple.snap b/tests/snapshots/integration__integration_tests__merge__readme_example_simple.snap
index bb7a03d7c..a046ce846 100644
--- a/tests/snapshots/integration__integration_tests__merge__readme_example_simple.snap
+++ b/tests/snapshots/integration__integration_tests__merge__readme_example_simple.snap
@@ -23,6 +23,7 @@ info:
SOURCE_DATE_EPOCH: "1735776000"
USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: true
@@ -36,4 +37,5 @@ exit_code: 0
  1 file changed, 13 insertions(+)
✓ Merged to main (1 commit, 1 file, +13)
◎ Removing fix-auth worktree & branch in background (same commit as main, _)
-○ Switched to worktree for main @ _REPO_
+▲ Cannot change directory — shell integration not installed
+↳ To enable automatic cd, run wt config shell install
diff --git a/tests/snapshots/integration__integration_tests__remove__remove_as_git_subcommand.snap b/tests/snapshots/integration__integration_tests__remove__remove_as_git_subcommand.snap
new file mode 100644
index 000000000..fda7d7a27
--- /dev/null
+++ b/tests/snapshots/integration__integration_tests__remove__remove_as_git_subcommand.snap
@@ -0,0 +1,36 @@
+---
+source: tests/integration_tests/remove.rs
+info:
+ program: wt
+ args:
+ - remove
+ env:
+ APPDATA: "[TEST_CONFIG_HOME]"
+ 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: ""
+ GIT_EXEC_PATH: /usr/lib/git-core
+ GIT_TERMINAL_PROMPT: "0"
+ HOME: "[TEST_HOME]"
+ LANG: C
+ LC_ALL: C
+ PATH: "[PATH]"
+ RUST_LOG: warn
+ SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
+---
+success: true
+exit_code: 0
+----- stdout -----
+
+----- stderr -----
+◎ Removing feature-git-subcmd worktree & branch in background (same commit as main, _)
+▲ Cannot change directory — ran git wt; running through git prevents cd
+↳ Use git-wt directly (via shell function) for automatic cd
diff --git a/tests/snapshots/integration__integration_tests__remove__remove_current_by_name.snap b/tests/snapshots/integration__integration_tests__remove__remove_current_by_name.snap
index 56c08d7b0..78a9f7fb7 100644
--- a/tests/snapshots/integration__integration_tests__remove__remove_current_by_name.snap
+++ b/tests/snapshots/integration__integration_tests__remove__remove_current_by_name.snap
@@ -23,6 +23,7 @@ info:
SOURCE_DATE_EPOCH: "1735776000"
USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: true
@@ -31,4 +32,5 @@ exit_code: 0
----- stderr -----
◎ Removing feature-current worktree & branch in background (same commit as main, _)
-○ Switched to worktree for main @ _REPO_
+▲ Cannot change directory — shell integration not installed
+↳ To enable automatic cd, run wt config shell install
diff --git a/tests/snapshots/integration__integration_tests__remove__remove_from_worktree.snap b/tests/snapshots/integration__integration_tests__remove__remove_from_worktree.snap
index 4f6dd413e..a3ec041bc 100644
--- a/tests/snapshots/integration__integration_tests__remove__remove_from_worktree.snap
+++ b/tests/snapshots/integration__integration_tests__remove__remove_from_worktree.snap
@@ -22,6 +22,7 @@ info:
SOURCE_DATE_EPOCH: "1735776000"
USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: true
@@ -30,4 +31,5 @@ exit_code: 0
----- stderr -----
◎ Removing feature-wt worktree & branch in background (same commit as main, _)
-○ Switched to worktree for main @ _REPO_
+▲ Cannot change directory — shell integration not installed
+↳ To enable automatic cd, run wt config shell install
diff --git a/tests/snapshots/integration__integration_tests__remove__remove_main_vs_linked__from_linked_succeeds.snap b/tests/snapshots/integration__integration_tests__remove__remove_main_vs_linked__from_linked_succeeds.snap
index 3a8cc8a9f..036824b0a 100644
--- a/tests/snapshots/integration__integration_tests__remove__remove_main_vs_linked__from_linked_succeeds.snap
+++ b/tests/snapshots/integration__integration_tests__remove__remove_main_vs_linked__from_linked_succeeds.snap
@@ -23,6 +23,7 @@ info:
SOURCE_DATE_EPOCH: "1735776000"
USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: true
@@ -32,4 +33,5 @@ exit_code: 0
----- stderr -----
◎ Removing current worktree...
✓ Removed feature worktree & branch (same commit as main, _)
-○ Switched to worktree for main @ _REPO_
+▲ Cannot change directory — shell integration not installed
+↳ To enable automatic cd, run wt config shell install
diff --git a/tests/snapshots/integration__integration_tests__remove__remove_multiple_including_current.snap b/tests/snapshots/integration__integration_tests__remove__remove_multiple_including_current.snap
index 9023a0b6a..7f759836f 100644
--- a/tests/snapshots/integration__integration_tests__remove__remove_multiple_including_current.snap
+++ b/tests/snapshots/integration__integration_tests__remove__remove_multiple_including_current.snap
@@ -25,6 +25,7 @@ info:
SOURCE_DATE_EPOCH: "1735776000"
USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: true
@@ -35,4 +36,5 @@ exit_code: 0
◎ Removing feature-b worktree & branch in background (same commit as main, _)
◎ Removing feature-c worktree & branch in background (same commit as main, _)
◎ Removing feature-a worktree & branch in background (same commit as main, _)
-○ Switched to worktree for main @ _REPO_
+▲ Cannot change directory — shell integration not installed
+↳ To enable automatic cd, run wt config shell install
diff --git a/tests/snapshots/integration__integration_tests__shell_integration_prompt__pty_tests__prompt_accept.snap b/tests/snapshots/integration__integration_tests__shell_integration_prompt__pty_tests__prompt_accept.snap
index 47662a943..1849ccd41 100644
--- a/tests/snapshots/integration__integration_tests__shell_integration_prompt__pty_tests__prompt_accept.snap
+++ b/tests/snapshots/integration__integration_tests__shell_integration_prompt__pty_tests__prompt_accept.snap
@@ -1,5 +1,6 @@
---
source: tests/integration_tests/shell_integration_prompt.rs
+assertion_line: 465
expression: normalized
---
y
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_as_git_subcommand.snap b/tests/snapshots/integration__integration_tests__switch__switch_as_git_subcommand.snap
new file mode 100644
index 000000000..79d12026f
--- /dev/null
+++ b/tests/snapshots/integration__integration_tests__switch__switch_as_git_subcommand.snap
@@ -0,0 +1,36 @@
+---
+source: tests/integration_tests/switch.rs
+info:
+ program: wt
+ args:
+ - switch
+ - git-subcommand-test
+ env:
+ APPDATA: "[TEST_CONFIG_HOME]"
+ 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: ""
+ GIT_EXEC_PATH: /usr/lib/git-core
+ GIT_TERMINAL_PROMPT: "0"
+ HOME: "[TEST_HOME]"
+ LANG: C
+ LC_ALL: C
+ PATH: "[PATH]"
+ RUST_LOG: warn
+ SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
+---
+success: true
+exit_code: 0
+----- stdout -----
+
+----- stderr -----
+▲ Worktree for git-subcommand-test @ _REPO_.git-subcommand-test, but cannot change directory — ran git wt; running through git prevents cd
+↳ Use git-wt directly (via shell function) for automatic cd
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 4c59e2acd..4d7b5103d 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_existing_internal.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_existing_internal.snap
@@ -23,7 +23,8 @@ info:
SOURCE_DATE_EPOCH: "1735776000"
USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
- WORKTRUNK_DIRECTIVE_FILE: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpEiloG9
+ WORKTRUNK_DIRECTIVE_FILE: "[DIRECTIVE_FILE]"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: true
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_no_warning_when_branch_matches.snap b/tests/snapshots/integration__integration_tests__switch__switch_no_warning_when_branch_matches.snap
index 0820705c1..24d2d32f4 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_no_warning_when_branch_matches.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_no_warning_when_branch_matches.snap
@@ -23,7 +23,8 @@ info:
SOURCE_DATE_EPOCH: "1735776000"
USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
- WORKTRUNK_DIRECTIVE_FILE: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpthQdH1
+ WORKTRUNK_DIRECTIVE_FILE: "[DIRECTIVE_FILE]"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: true
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_path_mismatch_no_shell.snap b/tests/snapshots/integration__integration_tests__switch__switch_path_mismatch_no_shell.snap
index 236a6c34c..a1fd6c32f 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_path_mismatch_no_shell.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_path_mismatch_no_shell.snap
@@ -31,6 +31,6 @@ exit_code: 0
----- stdout -----
----- stderr -----
-▲ Worktree for feature-mismatch @ [PROJECT_ID], but cannot change directory — shell integration not installed
▲ Worktree path doesn't match branch name; expected _REPO_.feature-mismatch ⚑
+▲ Worktree for feature-mismatch @ [PROJECT_ID], but cannot change directory — shell integration not installed
↳ To enable automatic cd, run wt config shell install
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_path_mismatch_shows_hint.snap b/tests/snapshots/integration__integration_tests__switch__switch_path_mismatch_shows_hint.snap
index c3f53ef9c..58f7ed2be 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_path_mismatch_shows_hint.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_path_mismatch_shows_hint.snap
@@ -23,7 +23,8 @@ info:
SOURCE_DATE_EPOCH: "1735776000"
USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
- WORKTRUNK_DIRECTIVE_FILE: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpxYhow8
+ WORKTRUNK_DIRECTIVE_FILE: "[DIRECTIVE_FILE]"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: true