Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
feat(cli): Introduce pre-commit/pre-squash hooks and consolidate shell configuration
Maximilian Roos16412c26a285
diff --git a/src/commands/configure_shell.rs b/src/commands/configure_shell.rsindex cad305e0a..38d41dfa7 100644--- a/src/commands/configure_shell.rs+++ b/src/commands/configure_shell.rs@@ -34,14 +34,10 @@ impl ConfigAction {pub fn handle_configure_shell(shell_filter: Option<Shell>,- cmd_prefix: &str,skip_confirmation: bool,) -> Result<Vec<ConfigureResult>, String> {- // Validate cmd_prefix to prevent command injection- validate_cmd_prefix(cmd_prefix)?;-// First, do a dry-run to see what would be changed- let preview_results = scan_shell_configs(shell_filter, cmd_prefix, true)?;+ let preview_results = scan_shell_configs(shell_filter, true)?;// If nothing to do, return earlyif preview_results.is_empty() {@@ -58,18 +54,17 @@ pub fn handle_configure_shell(return Ok(preview_results);}- // Show what will be done and ask for confirmation (unless --yes flag is used)+ // Show what will be done and ask for confirmation (unless --force flag is used)if !skip_confirmation && !prompt_for_confirmation(&preview_results)? {return Err("Cancelled by user".to_string());}- // User confirmed (or --yes flag was used), now actually apply the changes- scan_shell_configs(shell_filter, cmd_prefix, false)+ // User confirmed (or --force flag was used), now actually apply the changes+ scan_shell_configs(shell_filter, false)}fn scan_shell_configs(shell_filter: Option<Shell>,- cmd_prefix: &str,dry_run: bool,) -> Result<Vec<ConfigureResult>, String> {let shells = if let Some(shell) = shell_filter {@@ -92,7 +87,7 @@ fn scan_shell_configs(let mut checked_paths = Vec::new();for shell in shells {- let paths = shell.config_paths(cmd_prefix);+ let paths = shell.config_paths("wt");// Find the first existing config filelet target_path = paths.iter().find(|p| p.exists());@@ -119,8 +114,7 @@ fn scan_shell_configs(if should_configure {let path = target_path.or_else(|| paths.first());if let Some(path) = path {- match configure_shell_file(shell, path, cmd_prefix, dry_run, shell_filter.is_some())- {+ match configure_shell_file(shell, path, dry_run, shell_filter.is_some()) {Ok(Some(result)) => results.push(result),Ok(None) => {} // No action neededErr(e) => {@@ -153,26 +147,18 @@ fn scan_shell_configs(fn configure_shell_file(shell: Shell,path: &Path,- cmd_prefix: &str,dry_run: bool,explicit_shell: bool,) -> Result<Option<ConfigureResult>, String> {// Get a summary of the shell integration for display- let integration_summary = shell.integration_summary(cmd_prefix);+ let integration_summary = shell.integration_summary("wt");// The actual line we write to the config file- let config_content = shell.config_line(cmd_prefix);+ let config_content = shell.config_line("wt");// For Fish, we write to a separate conf.d/ fileif matches!(shell, Shell::Fish) {- return configure_fish_file(- shell,- path,- &config_content,- cmd_prefix,- dry_run,- explicit_shell,- );+ return configure_fish_file(shell, path, &config_content, dry_run, explicit_shell);}// For other shells, check if file exists@@ -265,12 +251,11 @@ fn configure_fish_file(shell: Shell,path: &Path,content: &str,- cmd_prefix: &str,dry_run: bool,explicit_shell: bool,) -> Result<Option<ConfigureResult>, String> {// Get a summary of the shell integration for display- let integration_summary = shell.integration_summary(cmd_prefix);+ let integration_summary = shell.integration_summary("wt");// For Fish, we write to conf.d/{cmd_prefix}.fish (separate file)@@ -377,39 +362,3 @@ fn prompt_for_confirmation(results: &[ConfigureResult]) -> Result<bool, String>let response = input.trim().to_lowercase();Ok(response == "y" || response == "yes")}--fn validate_cmd_prefix(cmd_prefix: &str) -> Result<(), String> {- // Ensure it's not empty- if cmd_prefix.is_empty() {- return Err("Command prefix cannot be empty".to_string());- }-- // Can't start with dash (would be interpreted as a flag)- if cmd_prefix.starts_with('-') {- return Err(format!(- "Invalid command prefix '{}': cannot start with '-'",- cmd_prefix- ));- }-- // Only allow alphanumeric, dash, and underscore- if !cmd_prefix- .chars()- .all(|c| c.is_alphanumeric() || c == '-' || c == '_')- {- return Err(format!(- "Invalid command prefix '{}': only alphanumeric characters, dash, and underscore allowed",- cmd_prefix- ));- }-- // Ensure it's not too long (reasonable limit)- if cmd_prefix.len() > 64 {- return Err(format!(- "Command prefix '{}' is too long (max 64 characters)",- cmd_prefix- ));- }-- Ok(())-}diff --git a/src/commands/init.rs b/src/commands/init.rsindex 5bd60aa8b..c4d6df1f6 100644--- a/src/commands/init.rs+++ b/src/commands/init.rs@@ -3,12 +3,8 @@ use clap_complete::{Shell as CompletionShell, generate};use worktrunk::shell;use worktrunk::styling::{ERROR, ERROR_EMOJI, println};-pub fn handle_init(- shell: shell::Shell,- cmd_name: &str,- cli_cmd: &mut Command,-) -> Result<(), String> {- let init = shell::ShellInit::new(shell, cmd_name.to_string());+pub fn handle_init(shell: shell::Shell, cli_cmd: &mut Command) -> Result<(), String> {+ let init = shell::ShellInit::new(shell, "wt".to_string());// Generate shell integration codelet integration_output = initdiff --git a/src/commands/worktree.rs b/src/commands/worktree.rsindex 04cf339f7..af881c34b 100644--- a/src/commands/worktree.rs+++ b/src/commands/worktree.rs@@ -20,7 +20,7 @@//! $ wt switch my-feature//! Created new branch and worktree for 'my-feature' at /path/to/worktree//!-//! To enable automatic cd, run: wt configure-shell+//! To enable automatic cd, run: wt config shell//!//! $ pwd//! /original/directory # ← User is still here!diff --git a/src/main.rs b/src/main.rsindex b876ef0be..a677b3e69 100644--- a/src/main.rs+++ b/src/main.rs@@ -51,6 +51,16 @@ enum ConfigCommand {List,/// Show setup guide for AI-generated commit messagesHelp,+ /// Configure shell by writing to config files+ Shell {+ /// Specific shell to configure (default: all shells with existing config files)+ #[arg(long, value_enum)]+ shell: Option<Shell>,++ /// Skip confirmation prompt+ #[arg(short, long)]+ force: bool,+ },}#[derive(Debug, Clone, Copy, ValueEnum)]@@ -96,25 +106,6 @@ enum Commands {Init {/// Shell to generate code forshell: Shell,-- /// Command prefix (default: wt)- #[arg(long, default_value = "wt")]- cmd: String,- },-- /// Configure shell by writing to config files- ConfigureShell {- /// Specific shell to configure (default: all shells with existing config files)- #[arg(long, value_enum)]- shell: Option<Shell>,-- /// Command prefix (default: wt)- #[arg(long, default_value = "wt")]- cmd: String,-- /// Skip confirmation prompt- #[arg(long, short)]- yes: bool,},/// Manage configuration@@ -337,63 +328,63 @@ fn main() {.init();let result = match cli.command {- Commands::Init { shell, cmd } => {+ Commands::Init { shell } => {let mut cli_cmd = Cli::command();- handle_init(shell, &cmd, &mut cli_cmd).git_err()- }- Commands::ConfigureShell { shell, cmd, yes } => {- handle_configure_shell(shell, &cmd, yes)- .map(|results| {- use anstyle::{AnsiColor, Color};-- // Count actual changes (not AlreadyExists)- let changes_count = results- .iter()- .filter(|r| !matches!(r.action, ConfigAction::AlreadyExists))- .count();-- if changes_count == 0 {- // All shells already configured- let green = Style::new().fg_color(Some(Color::Ansi(AnsiColor::Green)));- println!("{SUCCESS_EMOJI} {green}All shells already configured{green:#}");- return;- }-- // Show what was done (instant operations, no progress needed)- for result in &results {- use worktrunk::styling::format_bash_with_gutter;- let bold = Style::new().bold();- let shell = result.shell;- let path = result.path.display();- println!(- "{} {bold}{shell}{bold:#} {path}",- result.action.description(),- );- // Show config line with gutter- print!("{}", format_bash_with_gutter(&result.config_line, ""));- }-- // Success summary- println!();- let green = Style::new().fg_color(Some(Color::Ansi(AnsiColor::Green)));- let plural = if changes_count == 1 { "" } else { "s" };- println!(- "{SUCCESS_EMOJI} {green}Configured {changes_count} shell{plural}{green:#}"- );-- // Show hint about restarting shell- println!();- use worktrunk::styling::{HINT, HINT_EMOJI};- println!(- "{HINT_EMOJI} {HINT}Restart your shell or run: source <config-file>{HINT:#}"- );- })- .git_err()+ handle_init(shell, &mut cli_cmd).git_err()}Commands::Config { action } => match action {ConfigCommand::Init => handle_config_init(),ConfigCommand::List => handle_config_list(),ConfigCommand::Help => handle_config_help(),+ ConfigCommand::Shell { shell, force } => {+ handle_configure_shell(shell, force)+ .map(|results| {+ use anstyle::{AnsiColor, Color};++ // Count actual changes (not AlreadyExists)+ let changes_count = results+ .iter()+ .filter(|r| !matches!(r.action, ConfigAction::AlreadyExists))+ .count();++ if changes_count == 0 {+ // All shells already configured+ let green = Style::new().fg_color(Some(Color::Ansi(AnsiColor::Green)));+ println!("{SUCCESS_EMOJI} {green}All shells already configured{green:#}");+ return;+ }++ // Show what was done (instant operations, no progress needed)+ for result in &results {+ use worktrunk::styling::format_bash_with_gutter;+ let bold = Style::new().bold();+ let shell = result.shell;+ let path = result.path.display();+ println!(+ "{} {bold}{shell}{bold:#} {path}",+ result.action.description(),+ );+ // Show config line with gutter+ print!("{}", format_bash_with_gutter(&result.config_line, ""));+ }++ // Success summary+ println!();+ let green = Style::new().fg_color(Some(Color::Ansi(AnsiColor::Green)));+ let plural = if changes_count == 1 { "" } else { "s" };+ println!(+ "{SUCCESS_EMOJI} {green}Configured {changes_count} shell{plural}{green:#}"+ );++ // Show hint about restarting shell+ println!();+ use worktrunk::styling::{HINT, HINT_EMOJI};+ println!(+ "{HINT_EMOJI} {HINT}Restart your shell or run: source <config-file>{HINT:#}"+ );+ })+ .git_err()+ }},Commands::Dev { action } => match action {DevCommand::RunHook { hook_type, force } => handle_dev_run_hook(hook_type, force),diff --git a/src/output/global.rs b/src/output/global.rsindex 5e5c8a4bf..a4caf087e 100644--- a/src/output/global.rs+++ b/src/output/global.rs@@ -84,7 +84,7 @@ pub fn progress(message: impl Into<String>) -> io::Result<()> {/// Emit a hint message (only shown in interactive mode)///-/// Hints are suggestions for interactive users, like "To enable automatic cd, run: wt configure-shell"+/// Hints are suggestions for interactive users, like "To enable automatic cd, run: wt config shell"/// They are shown in interactive mode but suppressed in directive mode (where they don't apply).pub fn hint(message: impl Into<String>) -> io::Result<()> {OUTPUT_CONTEXT.with(|ctx| {diff --git a/src/output/handlers.rs b/src/output/handlers.rsindex 99462441f..229d7df0c 100644--- a/src/output/handlers.rs+++ b/src/output/handlers.rs@@ -66,7 +66,7 @@ fn format_remove_message(result: &RemoveResult) -> String {/// Shell integration hint messagefn shell_integration_hint() -> &'static str {- "To enable automatic cd, run: wt configure-shell"+ "To enable automatic cd, run: wt config shell"}/// Handle output for a switch operationdiff --git a/tests/integration_tests/configure_shell.rs b/tests/integration_tests/configure_shell.rsindex f95c5488f..c375b04da 100644--- a/tests/integration_tests/configure_shell.rs+++ b/tests/integration_tests/configure_shell.rs@@ -5,7 +5,7 @@ use std::fs;use std::process::Command;use tempfile::TempDir;-/// Test configure-shell with --yes flag (skips confirmation)+/// Test configure-shell with --force flag (skips confirmation)#[test]fn test_configure_shell_with_yes() {let repo = TestRepo::new();@@ -22,8 +22,9 @@ fn test_configure_shell_with_yes() {settings.bind(|| {let mut cmd = Command::new(get_cargo_bin("wt"));repo.clean_cli_env(&mut cmd);- cmd.arg("configure-shell")- .arg("--yes")+ cmd.arg("config")+ .arg("shell")+ .arg("--force").env("HOME", temp_home.path()).current_dir(repo.root_path());@@ -64,10 +65,11 @@ fn test_configure_shell_specific_shell() {settings.bind(|| {let mut cmd = Command::new(get_cargo_bin("wt"));repo.clean_cli_env(&mut cmd);- cmd.arg("configure-shell")+ cmd.arg("config")+ .arg("shell").arg("--shell").arg("zsh")- .arg("--yes")+ .arg("--force").env("HOME", temp_home.path()).current_dir(repo.root_path());@@ -112,10 +114,11 @@ fn test_configure_shell_already_exists() {settings.bind(|| {let mut cmd = Command::new(get_cargo_bin("wt"));repo.clean_cli_env(&mut cmd);- cmd.arg("configure-shell")+ cmd.arg("config")+ .arg("shell").arg("--shell").arg("zsh")- .arg("--yes")+ .arg("--force").env("HOME", temp_home.path()).current_dir(repo.root_path());@@ -135,56 +138,6 @@ fn test_configure_shell_already_exists() {assert_eq!(count, 1, "Should only have one wt init line");}-/// Test configure-shell with custom command prefix-#[test]-fn test_configure_shell_custom_prefix() {- let repo = TestRepo::new();- let temp_home = TempDir::new().unwrap();-- // Create the appropriate bash config file based on platform- let bash_config_path = if cfg!(target_os = "macos") {- temp_home.path().join(".bash_profile")- } else {- temp_home.path().join(".bashrc")- };- fs::write(&bash_config_path, "# Existing config\n").unwrap();-- let mut settings = Settings::clone_current();- settings.set_snapshot_path("../snapshots");- settings.add_filter(&temp_home.path().to_string_lossy(), "[TEMP_HOME]");-- settings.bind(|| {- let mut cmd = Command::new(get_cargo_bin("wt"));- repo.clean_cli_env(&mut cmd);- cmd.arg("configure-shell")- .arg("--shell")- .arg("bash")- .arg("--cmd")- .arg("worktree")- .arg("--yes")- .env("HOME", temp_home.path())- .current_dir(repo.root_path());-- assert_cmd_snapshot!(cmd, @r#"- success: true- exit_code: 0- ----- stdout ------ Added [1mbash[0m [TEMP_HOME]/.bash_profile- [40m [0m [1m[35mif [1m[34mcommand [36m-v worktree [36m>/dev/null [33m2>&1; [1m[35mthen [1m[34meval [32m"$([1m[34mworktree init bash)"; [1m[35mfi-- ✅ [32mConfigured 1 shell[0m-- 💡 [2mRestart your shell or run: source <config-file>[0m-- ----- stderr ------ "#);- });-- // Verify the file has the custom prefix- let content = fs::read_to_string(&bash_config_path).unwrap();- assert!(content.contains("eval \"$(worktree init bash)\""));-}-/// Test configure-shell for Fish (creates new file in conf.d/)#[test]fn test_configure_shell_fish() {@@ -198,10 +151,11 @@ fn test_configure_shell_fish() {settings.bind(|| {let mut cmd = Command::new(get_cargo_bin("wt"));repo.clean_cli_env(&mut cmd);- cmd.arg("configure-shell")+ cmd.arg("config")+ .arg("shell").arg("--shell").arg("fish")- .arg("--yes")+ .arg("--force").env("HOME", temp_home.path()).current_dir(repo.root_path());@@ -245,8 +199,9 @@ fn test_configure_shell_no_files() {settings.bind(|| {let mut cmd = Command::new(get_cargo_bin("wt"));repo.clean_cli_env(&mut cmd);- cmd.arg("configure-shell")- .arg("--yes")+ cmd.arg("config")+ .arg("shell")+ .arg("--force").env("HOME", temp_home.path()).current_dir(repo.root_path());@@ -262,57 +217,6 @@ fn test_configure_shell_no_files() {}/// Test configure-shell for Fish with custom prefix-#[test]-fn test_configure_shell_fish_custom_prefix() {- let repo = TestRepo::new();- let temp_home = TempDir::new().unwrap();-- let mut settings = Settings::clone_current();- settings.set_snapshot_path("../snapshots");- settings.add_filter(&temp_home.path().to_string_lossy(), "[TEMP_HOME]");-- settings.bind(|| {- let mut cmd = Command::new(get_cargo_bin("wt"));- repo.clean_cli_env(&mut cmd);- cmd.arg("configure-shell")- .arg("--shell")- .arg("fish")- .arg("--cmd")- .arg("worktree")- .arg("--yes")- .env("HOME", temp_home.path())- .current_dir(repo.root_path());-- assert_cmd_snapshot!(cmd, @r"- success: true- exit_code: 0- ----- stdout ------ Created [1mfish[0m [TEMP_HOME]/.config/fish/conf.d/worktree.fish- [40m [0m [1m[35mif [1m[34mtype [36m-q worktree; [1m[34mworktree init fish [36m| [1m[34msource; end-- ✅ [32mConfigured 1 shell[0m-- 💡 [2mRestart your shell or run: source <config-file>[0m-- ----- stderr ------ ");- });-- // Verify the fish conf.d file was created with correct prefix in filename- let fish_config = temp_home.path().join(".config/fish/conf.d/worktree.fish");- assert!(- fish_config.exists(),- "Fish config file should be created with custom prefix in filename"- );-- let content = fs::read_to_string(&fish_config).unwrap();- assert!(- content.trim() == "if type -q worktree; worktree init fish | source; end",- "Should contain conditional wrapper with custom prefix: {}",- content- );-}-/// Test configure-shell with multiple existing config files#[test]fn test_configure_shell_multiple_configs() {@@ -336,8 +240,9 @@ fn test_configure_shell_multiple_configs() {settings.bind(|| {let mut cmd = Command::new(get_cargo_bin("wt"));repo.clean_cli_env(&mut cmd);- cmd.arg("configure-shell")- .arg("--yes")+ cmd.arg("config")+ .arg("shell")+ .arg("--force").env("HOME", temp_home.path()).current_dir(repo.root_path());@@ -401,8 +306,9 @@ fn test_configure_shell_mixed_states() {settings.bind(|| {let mut cmd = Command::new(get_cargo_bin("wt"));repo.clean_cli_env(&mut cmd);- cmd.arg("configure-shell")- .arg("--yes")+ cmd.arg("config")+ .arg("shell")+ .arg("--force").env("HOME", temp_home.path()).current_dir(repo.root_path());diff --git a/tests/integration_tests/e2e_shell.rs b/tests/integration_tests/e2e_shell.rsindex 7e5c47fac..56a95f195 100644--- a/tests/integration_tests/e2e_shell.rs+++ b/tests/integration_tests/e2e_shell.rs@@ -236,49 +236,6 @@ fn test_bash_e2e_switch_preserves_output() {);}-#[test]-fn test_bash_e2e_custom_prefix() {- if !is_shell_available("bash") {- eprintln!("Skipping test: bash not available");- return;- }-- let repo = TestRepo::new();- repo.commit("Initial commit");-- // Generate init code with custom prefix- let mut cmd = Command::new(get_cargo_bin("wt"));- repo.clean_cli_env(&mut cmd);- let output = cmd- .args(["init", "bash", "--cmd", "custom"])- .current_dir(repo.root_path())- .output()- .expect("Failed to generate init code");-- let init_code = String::from_utf8(output.stdout).expect("Invalid UTF-8 in init code");-- // Test that custom switch works- let script = format!(- r#"- export PATH="{}:$PATH"- {}- custom switch --create my-feature- pwd- "#,- get_cargo_bin("wt").parent().unwrap().to_string_lossy(),- init_code- );-- let output = execute_shell_script(&repo, "bash", &script);-- // Verify that pwd shows we're in a worktree directory- assert!(- output.contains("my-feature"),- "Expected pwd to show my-feature worktree with custom prefix, got: {}",- output- );-}-#[test]fn test_bash_e2e_error_handling() {if !is_shell_available("bash") {diff --git a/tests/integration_tests/init.rs b/tests/integration_tests/init.rsindex 1ad104c14..80451358c 100644--- a/tests/integration_tests/init.rs+++ b/tests/integration_tests/init.rs@@ -40,11 +40,6 @@ fn test_init(#[case] shell: &str) {snapshot_init(&format!("init_{}", shell), shell, &[]);}-#[test]-fn test_init_bash_custom_prefix() {- snapshot_init("init_bash_custom_prefix", "bash", &["--cmd", "wt"]);-}-#[test]fn test_init_invalid_shell() {let repo = TestRepo::new();diff --git a/tests/snapshots/integration__integration_tests__init__init_bash.snap b/tests/snapshots/integration__integration_tests__init__init_bash.snapindex a4aa11a19..e2ff34242 100644--- a/tests/snapshots/integration__integration_tests__init__init_bash.snap+++ b/tests/snapshots/integration__integration_tests__init__init_bash.snap@@ -16,7 +16,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpbevAR4/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpAXfysi/test-config.toml---success: trueexit_code: 0@@ -166,9 +166,6 @@ _wt() {wt,config)cmd="wt__config";;- wt,configure-shell)- cmd="wt__configure__shell"- ;;wt,dev)cmd="wt__dev";;@@ -199,6 +196,9 @@ _wt() {wt__config,list)cmd="wt__config__list";;+ wt__config,shell)+ cmd="wt__config__shell"+ ;;wt__dev,run-hook)cmd="wt__dev__run__hook";;@@ -209,7 +209,7 @@ _wt() {case "${cmd}" inwt)- opts="-v -h -V --verbose --help --version init configure-shell config dev list switch remove push merge completion complete"+ opts="-v -h -V --verbose --help --version init config dev list switch remove push merge completion complete"if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; thenCOMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0@@ -251,7 +251,7 @@ _wt() {return 0;;wt__config)- opts="-v -h --verbose --help init list help"+ opts="-v -h --verbose --help init list help shell"if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; thenCOMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0@@ -306,9 +306,9 @@ _wt() {COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0;;- wt__configure__shell)- opts="-y -v -h --shell --cmd --yes --verbose --help"- if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then+ wt__config__shell)+ opts="-f -v -h --shell --force --verbose --help"+ if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; thenCOMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0fi@@ -317,10 +317,6 @@ _wt() {COMPREPLY=($(compgen -W "bash elvish fish nushell oil powershell xonsh zsh" -- "${cur}"))return 0;;- --cmd)- COMPREPLY=($(compgen -f "${cur}"))- return 0- ;;*)COMPREPLY=();;@@ -357,16 +353,12 @@ _wt() {return 0;;wt__init)- opts="-v -h --cmd --verbose --help bash elvish fish nushell oil powershell xonsh zsh"+ opts="-v -h --verbose --help bash elvish fish nushell oil powershell xonsh zsh"if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; thenCOMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )return 0ficase "${prev}" in- --cmd)- COMPREPLY=($(compgen -f "${cur}"))- return 0- ;;*)COMPREPLY=();;diff --git a/tests/snapshots/integration__integration_tests__init__init_fish.snap b/tests/snapshots/integration__integration_tests__init__init_fish.snapindex 63b945c4c..824e01ad1 100644--- a/tests/snapshots/integration__integration_tests__init__init_fish.snap+++ b/tests/snapshots/integration__integration_tests__init__init_fish.snap@@ -16,7 +16,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpKans54/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpYhu7T5/test-config.toml---success: trueexit_code: 0@@ -205,7 +205,6 @@ complete -c wt -n "__fish_wt_needs_command" -s v -l verbose -d 'Enable verbose ocomplete -c wt -n "__fish_wt_needs_command" -s h -l help -d 'Print help'complete -c wt -n "__fish_wt_needs_command" -s V -l version -d 'Print version'complete -c wt -n "__fish_wt_needs_command" -f -a "init" -d 'Generate shell integration code'-complete -c wt -n "__fish_wt_needs_command" -f -a "configure-shell" -d 'Configure shell by writing to config files'complete -c wt -n "__fish_wt_needs_command" -f -a "config" -d 'Manage configuration'complete -c wt -n "__fish_wt_needs_command" -f -a "dev" -d 'Development and testing utilities'complete -c wt -n "__fish_wt_needs_command" -f -a "list" -d 'List all worktrees'@@ -213,10 +212,21 @@ complete -c wt -n "__fish_wt_needs_command" -f -a "switch" -d 'Switch to a worktcomplete -c wt -n "__fish_wt_needs_command" -f -a "remove" -d 'Finish current worktree, returning to primary if current'complete -c wt -n "__fish_wt_needs_command" -f -a "push" -d 'Push changes between worktrees'complete -c wt -n "__fish_wt_needs_command" -f -a "merge" -d 'Merge worktree into target branch'-complete -c wt -n "__fish_wt_using_subcommand init" -l cmd -d 'Command prefix (default: wt)' -rcomplete -c wt -n "__fish_wt_using_subcommand init" -s v -l verbose -d 'Enable verbose output (show git commands and debug info)'complete -c wt -n "__fish_wt_using_subcommand init" -s h -l help -d 'Print help'-complete -c wt -n "__fish_wt_using_subcommand configure-shell" -l shell -d 'Specific shell to configure (default: all shells with existing config files)' -r -f -a "bash\t''+complete -c wt -n "__fish_wt_using_subcommand config; and not __fish_seen_subcommand_from init list help shell" -s v -l verbose -d 'Enable verbose output (show git commands and debug info)'+complete -c wt -n "__fish_wt_using_subcommand config; and not __fish_seen_subcommand_from init list help shell" -s h -l help -d 'Print help'+complete -c wt -n "__fish_wt_using_subcommand config; and not __fish_seen_subcommand_from init list help shell" -f -a "init" -d 'Initialize global configuration file with examples'+complete -c wt -n "__fish_wt_using_subcommand config; and not __fish_seen_subcommand_from init list help shell" -f -a "list" -d 'List all configuration files and their locations'+complete -c wt -n "__fish_wt_using_subcommand config; and not __fish_seen_subcommand_from init list help shell" -f -a "help" -d 'Show setup guide for AI-generated commit messages'+complete -c wt -n "__fish_wt_using_subcommand config; and not __fish_seen_subcommand_from init list help shell" -f -a "shell" -d 'Configure shell by writing to config files'+complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from init" -s v -l verbose -d 'Enable verbose output (show git commands and debug info)'+complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from init" -s h -l help -d 'Print help'+complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from list" -s v -l verbose -d 'Enable verbose output (show git commands and debug info)'+complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from list" -s h -l help -d 'Print help'+complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from help" -s v -l verbose -d 'Enable verbose output (show git commands and debug info)'+complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from help" -s h -l help -d 'Print help'+complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from shell" -l shell -d 'Specific shell to configure (default: all shells with existing config files)' -r -f -a "bash\t''elvish\t''fish\t''nushell\t''@@ -224,21 +234,9 @@ oil\t''powershell\t''xonsh\t''zsh\t''"-complete -c wt -n "__fish_wt_using_subcommand configure-shell" -l cmd -d 'Command prefix (default: wt)' -r-complete -c wt -n "__fish_wt_using_subcommand configure-shell" -s y -l yes -d 'Skip confirmation prompt'-complete -c wt -n "__fish_wt_using_subcommand configure-shell" -s v -l verbose -d 'Enable verbose output (show git commands and debug info)'-complete -c wt -n "__fish_wt_using_subcommand configure-shell" -s h -l help -d 'Print help'-complete -c wt -n "__fish_wt_using_subcommand config; and not __fish_seen_subcommand_from init list help" -s v -l verbose -d 'Enable verbose output (show git commands and debug info)'-complete -c wt -n "__fish_wt_using_subcommand config; and not __fish_seen_subcommand_from init list help" -s h -l help -d 'Print help'-complete -c wt -n "__fish_wt_using_subcommand config; and not __fish_seen_subcommand_from init list help" -f -a "init" -d 'Initialize global configuration file with examples'-complete -c wt -n "__fish_wt_using_subcommand config; and not __fish_seen_subcommand_from init list help" -f -a "list" -d 'List all configuration files and their locations'-complete -c wt -n "__fish_wt_using_subcommand config; and not __fish_seen_subcommand_from init list help" -f -a "help" -d 'Show setup guide for AI-generated commit messages'-complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from init" -s v -l verbose -d 'Enable verbose output (show git commands and debug info)'-complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from init" -s h -l help -d 'Print help'-complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from list" -s v -l verbose -d 'Enable verbose output (show git commands and debug info)'-complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from list" -s h -l help -d 'Print help'-complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from help" -s v -l verbose -d 'Enable verbose output (show git commands and debug info)'-complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from help" -s h -l help -d 'Print help'+complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from shell" -s f -l force -d 'Skip confirmation prompt'+complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from shell" -s v -l verbose -d 'Enable verbose output (show git commands and debug info)'+complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from shell" -s h -l help -d 'Print help'complete -c wt -n "__fish_wt_using_subcommand dev; and not __fish_seen_subcommand_from run-hook" -s v -l verbose -d 'Enable verbose output (show git commands and debug info)'complete -c wt -n "__fish_wt_using_subcommand dev; and not __fish_seen_subcommand_from run-hook" -s h -l help -d 'Print help'complete -c wt -n "__fish_wt_using_subcommand dev; and not __fish_seen_subcommand_from run-hook" -f -a "run-hook" -d 'Run a project hook for testing'diff --git a/tests/snapshots/integration__integration_tests__init__init_zsh.snap b/tests/snapshots/integration__integration_tests__init__init_zsh.snapindex 355cc5267..5bf9c3d69 100644--- a/tests/snapshots/integration__integration_tests__init__init_zsh.snap+++ b/tests/snapshots/integration__integration_tests__init__init_zsh.snap@@ -16,7 +16,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpLp28xJ/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpK3Q9VM/test-config.toml---success: trueexit_code: 0@@ -154,7 +154,6 @@ _wt() {case $line[1] in(init)_arguments "${_arguments_options[@]}" : \-'--cmd=[Command prefix (default\: wt)]:CMD:_default' \'-v[Enable verbose output (show git commands and debug info)]' \'--verbose[Enable verbose output (show git commands and debug info)]' \'-h[Print help]' \@@ -162,18 +161,6 @@ _arguments "${_arguments_options[@]}" : \':shell -- Shell to generate code for:(bash elvish fish nushell oil powershell xonsh zsh)' \&& ret=0;;-(configure-shell)-_arguments "${_arguments_options[@]}" : \-'--shell=[Specific shell to configure (default\: all shells with existing config files)]:SHELL:(bash elvish fish nushell oil powershell xonsh zsh)' \-'--cmd=[Command prefix (default\: wt)]:CMD:_default' \-'-y[Skip confirmation prompt]' \-'--yes[Skip confirmation prompt]' \-'-v[Enable verbose output (show git commands and debug info)]' \-'--verbose[Enable verbose output (show git commands and debug info)]' \-'-h[Print help]' \-'--help[Print help]' \-&& ret=0-;;(config)_arguments "${_arguments_options[@]}" : \'-v[Enable verbose output (show git commands and debug info)]' \@@ -213,6 +200,17 @@ _arguments "${_arguments_options[@]}" : \'-h[Print help]' \'--help[Print help]' \&& ret=0+;;+(shell)+_arguments "${_arguments_options[@]}" : \+'--shell=[Specific shell to configure (default\: all shells with existing config files)]:SHELL:(bash elvish fish nushell oil powershell xonsh zsh)' \+'-f[Skip confirmation prompt]' \+'--force[Skip confirmation prompt]' \+'-v[Enable verbose output (show git commands and debug info)]' \+'--verbose[Enable verbose output (show git commands and debug info)]' \+'-h[Print help]' \+'--help[Print help]' \+&& ret=0;;esac;;@@ -340,7 +338,6 @@ esac_wt_commands() {local commands; commands=('init:Generate shell integration code' \-'configure-shell:Configure shell by writing to config files' \'config:Manage configuration' \'dev:Development and testing utilities' \'list:List all worktrees' \@@ -369,6 +366,7 @@ _wt__config_commands() {'init:Initialize global configuration file with examples' \'list:List all configuration files and their locations' \'help:Show setup guide for AI-generated commit messages' \+'shell:Configure shell by writing to config files' \)_describe -t commands 'wt config commands' commands "$@"}@@ -387,10 +385,10 @@ _wt__config__list_commands() {local commands; commands=()_describe -t commands 'wt config list commands' commands "$@"}-(( $+functions[_wt__configure-shell_commands] )) ||-_wt__configure-shell_commands() {+(( $+functions[_wt__config__shell_commands] )) ||+_wt__config__shell_commands() {local commands; commands=()- _describe -t commands 'wt configure-shell commands' commands "$@"+ _describe -t commands 'wt config shell commands' commands "$@"}(( $+functions[_wt__dev_commands] )) ||_wt__dev_commands() {diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__both_create_and_start.snap b/tests/snapshots/integration__integration_tests__post_start_commands__both_create_and_start.snapindex 00151cf82..32ceb4e81 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__both_create_and_start.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__both_create_and_start.snap@@ -17,7 +17,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpo60Axs/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpAKOlr9/test-config.toml---success: trueexit_code: 0@@ -30,6 +30,6 @@ exit_code: 0✅ [32mCreated new worktree for [1m[32mfeature[0m at [REPO].feature[0m-To enable automatic cd, run: wt configure-shell+To enable automatic cd, run: wt config shell----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_failing_command.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_failing_command.snapindex 8da60cff9..842eb3505 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_failing_command.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_failing_command.snap@@ -17,7 +17,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpeIQPNl/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpopQ2Ih/test-config.toml---success: trueexit_code: 0@@ -28,6 +28,6 @@ exit_code: 0🟡 [33mCommand failed: Command failed with exit code: exit status: 1[0m✅ [32mCreated new worktree for [1m[32mfeature[0m at [REPO].feature[0m-To enable automatic cd, run: wt configure-shell+To enable automatic cd, run: wt config shell----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_multiline_control_structure.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_multiline_control_structure.snapindex 6ab21ae95..debf2a2c0 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_multiline_control_structure.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_multiline_control_structure.snap@@ -17,7 +17,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpJzbw9X/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpfrFpSC/test-config.toml---success: trueexit_code: 0@@ -31,6 +31,6 @@ exit_code: 0✅ [32mCreated new worktree for [1m[32mfeature[0m at [REPO].feature[0m-To enable automatic cd, run: wt configure-shell+To enable automatic cd, run: wt config shell----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_multiple_commands_array.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_multiple_commands_array.snapindex bd2f8f189..c92454b4e 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_multiple_commands_array.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_multiple_commands_array.snap@@ -17,7 +17,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpdPKQvs/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpqgi6Xx/test-config.toml---success: trueexit_code: 0@@ -30,7 +30,7 @@ exit_code: 0✅ [32mCreated new worktree for [1m[32mfeature[0m at [REPO].feature[0m-To enable automatic cd, run: wt configure-shell+To enable automatic cd, run: wt config shell----- stderr -----Firstdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_named_commands.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_named_commands.snapindex 71683437b..f712a8c00 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_named_commands.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_named_commands.snap@@ -17,7 +17,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpfqP0vf/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpgXYQPe/test-config.toml---success: trueexit_code: 0@@ -30,7 +30,7 @@ exit_code: 0✅ [32mCreated new worktree for [1m[32mfeature[0m at [REPO].feature[0m-To enable automatic cd, run: wt configure-shell+To enable automatic cd, run: wt config shell----- stderr -----Installing depsdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_no_config.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_no_config.snapindex a65acb1ac..dec5bfd61 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_no_config.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_no_config.snap@@ -8,6 +8,7 @@ info:- featureenv:CLICOLOR_FORCE: "1"+ COLUMNS: "150"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"GIT_CONFIG_GLOBAL: /dev/null@@ -16,13 +17,13 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp4VKpL3/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpnqrWS4/test-config.toml---success: trueexit_code: 0----- stdout -----✅ [32mCreated new worktree for [1m[32mfeature[0m at [REPO].feature[0m-To enable automatic cd, run: wt configure-shell+To enable automatic cd, run: wt config shell----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_single_command.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_single_command.snapindex 9e0b6bfa0..712ad5d77 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_single_command.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_single_command.snap@@ -17,7 +17,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp2xdqGN/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpJewyte/test-config.toml---success: trueexit_code: 0@@ -27,7 +27,7 @@ exit_code: 0✅ [32mCreated new worktree for [1m[32mfeature[0m at [REPO].feature[0m-To enable automatic cd, run: wt configure-shell+To enable automatic cd, run: wt config shell----- stderr -----Setup completediff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_template_expansion.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_template_expansion.snapindex 2eb0f3c27..34b37007f 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_template_expansion.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_template_expansion.snap@@ -17,7 +17,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpDTK7pT/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpunyykX/test-config.toml---success: trueexit_code: 0@@ -36,6 +36,6 @@ exit_code: 0✅ [32mCreated new worktree for [1m[32mfeature/test[0m at [REPO].feature-test[0m-To enable automatic cd, run: wt configure-shell+To enable automatic cd, run: wt config shell----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_complex_shell.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_complex_shell.snapindex e02a1ef1a..9db3d9c00 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_complex_shell.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_complex_shell.snap@@ -17,7 +17,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpx7u9uZ/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmptK8KDg/test-config.toml---success: trueexit_code: 0@@ -29,6 +29,6 @@ exit_code: 0✅ [32mCreated new worktree for [1m[32mfeature[0m at [REPO].feature[0m-To enable automatic cd, run: wt configure-shell+To enable automatic cd, run: wt config shell----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_invalid_command.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_invalid_command.snapindex e02f28fef..0ccd9b644 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_invalid_command.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_invalid_command.snap@@ -17,7 +17,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpulSoY3/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpprEuqk/test-config.toml---success: trueexit_code: 0@@ -27,6 +27,6 @@ exit_code: 0✅ [32mCreated new worktree for [1m[32mfeature[0m at [REPO].feature[0m-To enable automatic cd, run: wt configure-shell+To enable automatic cd, run: wt config shell----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_log_captures_output.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_log_captures_output.snapindex bbee89fdc..d2e7d0e0a 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_log_captures_output.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_log_captures_output.snap@@ -17,7 +17,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpo2wwac/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpPEblxW/test-config.toml---success: trueexit_code: 0@@ -27,6 +27,6 @@ exit_code: 0✅ [32mCreated new worktree for [1m[32mfeature[0m at [REPO].feature[0m-To enable automatic cd, run: wt configure-shell+To enable automatic cd, run: wt config shell----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiline_with_newlines.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiline_with_newlines.snapindex 7e3656dac..32411867d 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiline_with_newlines.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiline_with_newlines.snap@@ -17,7 +17,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpfQS2u4/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpCykZDL/test-config.toml---success: trueexit_code: 0@@ -29,6 +29,6 @@ exit_code: 0✅ [32mCreated new worktree for [1m[32mfeature[0m at [REPO].feature[0m-To enable automatic cd, run: wt configure-shell+To enable automatic cd, run: wt config shell----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiple_background.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiple_background.snapindex f86e91219..ed3dfb92a 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiple_background.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiple_background.snap@@ -17,7 +17,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpSA3UaZ/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp0QjssA/test-config.toml---success: trueexit_code: 0@@ -30,6 +30,6 @@ exit_code: 0✅ [32mCreated new worktree for [1m[32mfeature[0m at [REPO].feature[0m-To enable automatic cd, run: wt configure-shell+To enable automatic cd, run: wt config shell----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_separate_logs.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_separate_logs.snapindex 7eb657707..3a3b18520 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_separate_logs.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_separate_logs.snap@@ -17,7 +17,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpBD9Ve9/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmppyH2yJ/test-config.toml---success: trueexit_code: 0@@ -33,6 +33,6 @@ exit_code: 0✅ [32mCreated new worktree for [1m[32mfeature[0m at [REPO].feature[0m-To enable automatic cd, run: wt configure-shell+To enable automatic cd, run: wt config shell----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_single_background.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_single_background.snapindex 3ff1edcd8..19311ff54 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_single_background.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_single_background.snap@@ -17,7 +17,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp6WjLOS/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpZ8t2UL/test-config.toml---success: trueexit_code: 0@@ -27,6 +27,6 @@ exit_code: 0✅ [32mCreated new worktree for [1m[32mfeature[0m at [REPO].feature[0m-To enable automatic cd, run: wt configure-shell+To enable automatic cd, run: wt config shell----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__switch__switch_base_without_create.snap b/tests/snapshots/integration__integration_tests__switch__switch_base_without_create.snapindex e34a07681..9f40e2961 100644--- a/tests/snapshots/integration__integration_tests__switch__switch_base_without_create.snap+++ b/tests/snapshots/integration__integration_tests__switch__switch_base_without_create.snap@@ -9,6 +9,7 @@ info:- mainenv:CLICOLOR_FORCE: "1"+ COLUMNS: "150"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"GIT_CONFIG_GLOBAL: /dev/null@@ -17,7 +18,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpOYNM6L/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpwwv9YA/test-config.toml---success: trueexit_code: 0@@ -25,6 +26,6 @@ exit_code: 0🟡 [33m--base flag is only used with --create, ignoring[0m✅ [32mSwitched to worktree for [1m[32mmain[0m at [REPO][0m-To enable automatic cd, run: wt configure-shell+To enable automatic cd, run: wt config shell----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__switch__switch_create_new.snap b/tests/snapshots/integration__integration_tests__switch__switch_create_new.snapindex b18b74580..0a770147e 100644--- a/tests/snapshots/integration__integration_tests__switch__switch_create_new.snap+++ b/tests/snapshots/integration__integration_tests__switch__switch_create_new.snap@@ -8,6 +8,7 @@ info:- feature-xenv:CLICOLOR_FORCE: "1"+ COLUMNS: "150"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"GIT_CONFIG_GLOBAL: /dev/null@@ -16,13 +17,13 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpO6vqeg/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpuMZ1Qn/test-config.toml---success: trueexit_code: 0----- stdout -----✅ [32mCreated new worktree for [1m[32mfeature-x[0m at [REPO].feature-x[0m-To enable automatic cd, run: wt configure-shell+To enable automatic cd, run: wt config shell----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__switch__switch_existing_branch.snap b/tests/snapshots/integration__integration_tests__switch__switch_existing_branch.snapindex 553a961b7..84bf621a2 100644--- a/tests/snapshots/integration__integration_tests__switch__switch_existing_branch.snap+++ b/tests/snapshots/integration__integration_tests__switch__switch_existing_branch.snap@@ -7,6 +7,7 @@ info:- feature-zenv:CLICOLOR_FORCE: "1"+ COLUMNS: "150"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"GIT_CONFIG_GLOBAL: /dev/null@@ -15,13 +16,13 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpqKcjQS/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp37HyDy/test-config.toml---success: trueexit_code: 0----- stdout -----✅ [32mSwitched to worktree for [1m[32mfeature-z[0m at [WORKTREE_FEATURE_Z][0m-To enable automatic cd, run: wt configure-shell+To enable automatic cd, run: wt config shell----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_skips_post_start.snap b/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_skips_post_start.snapindex 560690a37..8b66fa50b 100644--- a/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_skips_post_start.snap+++ b/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_skips_post_start.snap@@ -9,22 +9,23 @@ info:- "--no-hooks"env:CLICOLOR_FORCE: "1"+ COLUMNS: "150"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"GIT_CONFIG_GLOBAL: /dev/nullGIT_CONFIG_SYSTEM: /dev/nullGIT_EDITOR: ""- HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpYy8EQ9+ HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpKmwmL8LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpZTSxt9/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpnMm4h0/test-config.toml---success: trueexit_code: 0----- stdout -----✅ [32mCreated new worktree for [1m[32mno-post-start[0m at [REPO].no-post-start[0m-To enable automatic cd, run: wt configure-shell+To enable automatic cd, run: wt config shell----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_with_force.snap b/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_with_force.snapindex da1083547..c2b7f6881 100644--- a/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_with_force.snap+++ b/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_with_force.snap@@ -10,22 +10,23 @@ info:- "--no-hooks"env:CLICOLOR_FORCE: "1"+ COLUMNS: "150"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"GIT_CONFIG_GLOBAL: /dev/nullGIT_CONFIG_SYSTEM: /dev/nullGIT_EDITOR: ""- HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpcubWBl+ HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp3NrRsxLANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpxYEEx6/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpfdjEP4/test-config.toml---success: trueexit_code: 0----- stdout -----✅ [32mCreated new worktree for [1m[32mforce-no-hooks[0m at [REPO].force-no-hooks[0m-To enable automatic cd, run: wt configure-shell+To enable automatic cd, run: wt config shell----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__switch__switch_with_base.snap b/tests/snapshots/integration__integration_tests__switch__switch_with_base.snapindex ba7d54b2b..debd55a17 100644--- a/tests/snapshots/integration__integration_tests__switch__switch_with_base.snap+++ b/tests/snapshots/integration__integration_tests__switch__switch_with_base.snap@@ -10,6 +10,7 @@ info:- feature-with-baseenv:CLICOLOR_FORCE: "1"+ COLUMNS: "150"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"GIT_CONFIG_GLOBAL: /dev/null@@ -18,13 +19,13 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp9AfN5I/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpAJXuVQ/test-config.toml---success: trueexit_code: 0----- stdout -----✅ [32mCreated new worktree for [1m[32mfeature-with-base[0m at [REPO].feature-with-base[0m-To enable automatic cd, run: wt configure-shell+To enable automatic cd, run: wt config shell----- stderr -----