Skip to content

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

refactor: Rename `config init` to `config create`

Maximilian Roos7ca9f3596ce9
diff --git a/.claude-plugin/skills/worktrunk/SKILL.md b/.claude-plugin/skills/worktrunk/SKILL.md
index f6d7219e0..07f2bb5ea 100644
--- a/.claude-plugin/skills/worktrunk/SKILL.md
+++ b/.claude-plugin/skills/worktrunk/SKILL.md
@@ -83,7 +83,7 @@ Most common request. Follow this sequence:
5. **After approval, apply**
- Check if config exists: `wt config list`
- - If not, guide through `wt config init`
+ - If not, guide through `wt config create`
- Read, modify, write preserving structure
6. **Suggest testing**
@@ -176,7 +176,7 @@ Common request for workflow automation. Follow discovery process:
wt config list
# Create initial user config
-wt config init
+wt config create
# LLM setup guide
wt config --help
diff --git a/.claude-plugin/skills/worktrunk/reference/README.md b/.claude-plugin/skills/worktrunk/reference/README.md
index bdb1187b4..4ec45aabf 100644
--- a/.claude-plugin/skills/worktrunk/reference/README.md
+++ b/.claude-plugin/skills/worktrunk/reference/README.md
@@ -69,7 +69,7 @@ See [`wt list`](#wt-list) for all options.
```bash
cargo install worktrunk
-wt config shell # Sets up shell integration
+wt config shell install # Sets up shell integration
```
See [Shell Integration](#shell-integration) for details.
@@ -126,7 +126,7 @@ $ wt merge
✅ Squashed @ a1b2c3d
```
-To set up integration: run `wt config --help` to see the setup guide, or `wt config init` to create an example config file.
+To set up integration: run `wt config --help` to see the setup guide, or `wt config create` to create an example config file.
<details>
<summary>Advanced: Custom Prompt Templates</summary>
@@ -720,9 +720,6 @@ Enable AI-generated commit messages
command = "llm"
```
-Use `wt config init` to create the config file if it doesn't exist.
-Use `wt config list` to view your current configuration.
-
Docs: https://llm.datasette.io/ | https://github.com/sigoden/aichat
</details>
@@ -746,7 +743,7 @@ These commands are subject to change:
```bash
wt config list # Show all config files and locations
-wt config init # Create global config with examples
+wt config create # Create global config with examples
wt config --help # Show LLM setup guide
```
diff --git a/.claude-plugin/skills/worktrunk/reference/user-config.md b/.claude-plugin/skills/worktrunk/reference/user-config.md
index 6ae0c4168..3bf3a9fa0 100644
--- a/.claude-plugin/skills/worktrunk/reference/user-config.md
+++ b/.claude-plugin/skills/worktrunk/reference/user-config.md
@@ -81,7 +81,7 @@ Ask: "Should I add this to your config at `~/.config/worktrunk/config.toml`?"
wt config list
```
-If not: guide through `wt config init` first.
+If not: guide through `wt config create` first.
### Step 6: Apply the Change
@@ -259,7 +259,7 @@ command = "npm install"
```bash
wt config list # View current config
-wt config init # Create initial config file
+wt config create # Create initial config file
wt config --help # Show LLM setup guide
```
diff --git a/.config/lychee.toml b/.config/lychee.toml
index ac6775502..192a841bd 100644
--- a/.config/lychee.toml
+++ b/.config/lychee.toml
@@ -31,6 +31,9 @@ exclude = [
# Sites already excluded in markdown-link-check
"~opensource\\.org",
"~llm\\.datasette\\.io",
+
+ # Local build artifacts (not checked into git)
+ "~wt-demo/out/wt-demo\\.gif",
]
# Exclude files with relative paths intended for different locations
diff --git a/README.md b/README.md
index bdb1187b4..4ec45aabf 100644
--- a/README.md
+++ b/README.md
@@ -69,7 +69,7 @@ See [`wt list`](#wt-list) for all options.
```bash
cargo install worktrunk
-wt config shell # Sets up shell integration
+wt config shell install # Sets up shell integration
```
See [Shell Integration](#shell-integration) for details.
@@ -126,7 +126,7 @@ $ wt merge
✅ Squashed @ a1b2c3d
```
-To set up integration: run `wt config --help` to see the setup guide, or `wt config init` to create an example config file.
+To set up integration: run `wt config --help` to see the setup guide, or `wt config create` to create an example config file.
<details>
<summary>Advanced: Custom Prompt Templates</summary>
@@ -720,9 +720,6 @@ Enable AI-generated commit messages
command = "llm"
```
-Use `wt config init` to create the config file if it doesn't exist.
-Use `wt config list` to view your current configuration.
-
Docs: https://llm.datasette.io/ | https://github.com/sigoden/aichat
</details>
@@ -746,7 +743,7 @@ These commands are subject to change:
```bash
wt config list # Show all config files and locations
-wt config init # Create global config with examples
+wt config create # Create global config with examples
wt config --help # Show LLM setup guide
```
diff --git a/config.example.toml b/config.example.toml
index 59ede5a94..bbae004f0 100644
--- a/config.example.toml
+++ b/config.example.toml
@@ -3,7 +3,7 @@
# macOS/Linux: ~/.config/worktrunk/config.toml (or $XDG_CONFIG_HOME/worktrunk/config.toml)
# Windows: %APPDATA%\worktrunk\config.toml
#
-# Generate with: wt config init
+# Generate with: wt config create
#
# NOTE: This file is the source of truth for default configuration.
# The commented templates below match src/llm.rs constants:
diff --git a/scripts/wt-demo-build.sh b/scripts/wt-demo-build.sh
index fcd4c1ab9..cd4a828ed 100755
--- a/scripts/wt-demo-build.sh
+++ b/scripts/wt-demo-build.sh
@@ -278,7 +278,7 @@ record_text() {
export NO_COLOR=1
export CLICOLOR=0
eval "$(starship init bash)" >/dev/null 2>&1
- eval "$(wt init bash)" >/dev/null 2>&1
+ eval "$(wt config shell init bash)" >/dev/null 2>&1
cd "$DEMO_REPO"
{
wt list --branches --full
diff --git a/scripts/wt-demo/demo.tape b/scripts/wt-demo/demo.tape
index 06921debe..67fcee45b 100644
--- a/scripts/wt-demo/demo.tape
+++ b/scripts/wt-demo/demo.tape
@@ -28,7 +28,7 @@ Type "export PATH=$HOME/bin:$PATH"
Enter
Type 'eval "$(starship init zsh)" >/dev/null 2>&1'
Enter
-Type 'eval "$(wt init zsh)" >/dev/null 2>&1'
+Type 'eval "$(wt config shell init zsh)" >/dev/null 2>&1'
Enter
Type "cd $DEMO_REPO"
Enter
diff --git a/src/cli.rs b/src/cli.rs
index c5d1d1816..9d76779f2 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -131,55 +131,48 @@ pub struct Cli {
}
#[derive(Subcommand)]
-pub enum ConfigCommand {
- /// Initialize global configuration file with examples
- Init,
- /// List configuration files & locations
- List,
- /// Refresh default branch from remote
- RefreshCache,
- /// Configure shell integration
- #[command(long_about = r#"Configure shell by writing to config files
-
-This command automatically adds the appropriate integration line to your shell's config file.
-It supports Bash, Zsh, Fish, Nushell, PowerShell, Elvish, Xonsh, and Oil.
-
-The integration enables 'wt switch' to change directories and 'wt remove' to return to the
-previous location.
-
-MANUAL SETUP (if you prefer):
+pub enum ConfigShellCommand {
+ /// Generate shell integration code
+ #[command(after_long_help = r#"MANUAL SETUP:
Add one line to your shell config:
Bash (~/.bashrc):
- eval "$(wt init bash)"
+ eval "$(wt config shell init bash)"
Fish (~/.config/fish/config.fish):
- wt init fish | source
+ wt config shell init fish | source
Zsh (~/.zshrc):
- eval "$(wt init zsh)"
+ eval "$(wt config shell init zsh)"
+
+AUTO SETUP:
-Nushell (~/.config/nushell/env.nu):
- wt init nushell | save -f ~/.cache/wt-init.nu
+Use 'wt config shell install' to automatically add to your shell config."#)]
+ Init {
+ /// Shell to generate code for
+ #[arg(value_enum)]
+ shell: Shell,
-Then add to ~/.config/nushell/config.nu:
- source ~/.cache/wt-init.nu
+ /// Command name
+ #[arg(long, default_value = DEFAULT_COMMAND_NAME)]
+ command_name: String,
+ },
-PowerShell (profile):
- wt init powershell | Out-String | Invoke-Expression
+ /// Write shell integration to config files
+ #[command(after_long_help = r#"AUTO SETUP:
-Elvish (~/.config/elvish/rc.elv):
- eval (wt init elvish | slurp)
+Detects existing shell config files and adds integration:
+ wt config shell install
-Xonsh (~/.xonshrc):
- execx($(wt init xonsh))
+Install for specific shell only:
+ wt config shell install zsh
-Oil Shell (~/.config/oil/oshrc):
- eval "$(wt init oil)""#)]
- Shell {
- /// Shell to configure
- #[arg(long, value_enum)]
+Skip confirmation prompt:
+ wt config shell install --force"#)]
+ Install {
+ /// Shell to install (default: auto-detect)
+ #[arg(value_enum)]
shell: Option<Shell>,
/// Skip confirmation prompt
@@ -190,6 +183,24 @@ Oil Shell (~/.config/oil/oshrc):
#[arg(long, default_value = DEFAULT_COMMAND_NAME)]
command_name: String,
},
+}
+
+#[derive(Subcommand)]
+pub enum ConfigCommand {
+ /// Shell integration setup
+ Shell {
+ #[command(subcommand)]
+ action: ConfigShellCommand,
+ },
+
+ /// Create global configuration file
+ Create,
+
+ /// List configuration files & locations
+ List,
+
+ /// Refresh default branch from remote
+ RefreshCache,
/// Manage branch status markers
Status {
@@ -309,50 +320,42 @@ pub enum StandaloneCommand {
#[derive(Subcommand)]
pub enum Commands {
- /// Generate shell integration code
- Init {
- /// Shell to generate code for
- shell: Shell,
+ /// Manage configuration and shell integration
+ #[command(
+ about = "Manage configuration and shell integration",
+ after_long_help = r#"SETUP GUIDE:
- /// Command name
- #[arg(long, default_value = DEFAULT_COMMAND_NAME)]
- command_name: String,
- },
+1. Set up shell integration
- /// Manage configuration
- #[command(
- about = "Manage configuration",
- after_long_help = r#"LLM SETUP GUIDE:
-Enable AI-generated commit messages
+ wt config shell install
+
+ Or manually add to your shell config:
+ eval "$(wt config shell init bash)"
+
+2. (Optional) Create config file
+
+ wt config create
-1. Install an LLM tool (llm, aichat)
+ This creates ~/.config/worktrunk/config.toml with examples.
- uv tool install -U llm
+3. (Optional) Enable LLM commit messages
-2. Configure a model
+ Install: uv tool install -U llm
+ Configure: llm keys set anthropic
+ Add to config.toml:
+ [commit-generation]
+ command = "llm"
+
+LLM SETUP DETAILS:
For Claude:
llm install llm-anthropic
llm keys set anthropic
- # Paste your API key from: https://console.anthropic.com/settings/keys
llm models default claude-3.5-sonnet
For OpenAI:
llm keys set openai
- # Paste your API key from: https://platform.openai.com/api-keys
-
-3. Test it works
-
- llm "say hello"
-
-4. Configure worktrunk
-
-Add to ~/.config/worktrunk/config.toml:
-
- [commit-generation]
- command = "llm"
-Use 'wt config init' to create the config file if it doesn't exist
Use 'wt config list' to view your current configuration
Docs: https://llm.datasette.io/ | https://github.com/sigoden/aichat
"#
diff --git a/src/commands/config.rs b/src/commands/config.rs
index 68ec0b6e3..ed216d703 100644
--- a/src/commands/config.rs
+++ b/src/commands/config.rs
@@ -11,8 +11,8 @@ use worktrunk::styling::{
/// Example configuration file content
const CONFIG_EXAMPLE: &str = include_str!("../../config.example.toml");
-/// Handle the config init command
-pub fn handle_config_init() -> anyhow::Result<()> {
+/// Handle the config create command
+pub fn handle_config_create() -> anyhow::Result<()> {
let config_path = get_global_config_path()
.ok_or_else(|| anyhow::anyhow!("Could not determine global config path"))?;
@@ -78,7 +78,7 @@ fn display_global_config() -> anyhow::Result<()> {
// Check if file exists
if !config_path.exists() {
println!("{HINT_EMOJI} {HINT}Not found (using defaults){HINT:#}");
- println!("{HINT_EMOJI} {HINT}Run 'wt config init' to create a config file{HINT:#}");
+ println!("{HINT_EMOJI} {HINT}Run 'wt config create' to create a config file{HINT:#}");
println!();
let default_config =
"# Default configuration:\nworktree-path = \"../{{ main_worktree }}.{{ branch }}\"";
diff --git a/src/commands/mod.rs b/src/commands/mod.rs
index bfc3c7f68..f7b78471b 100644
--- a/src/commands/mod.rs
+++ b/src/commands/mod.rs
@@ -17,8 +17,8 @@ pub mod standalone;
pub mod worktree;
pub use config::{
- handle_config_init, handle_config_list, handle_config_refresh_cache, handle_config_status_set,
- handle_config_status_unset,
+ handle_config_create, handle_config_list, handle_config_refresh_cache,
+ handle_config_status_set, handle_config_status_unset,
};
pub use configure_shell::{ConfigAction, handle_configure_shell};
pub use init::handle_init;
diff --git a/src/commands/worktree.rs b/src/commands/worktree.rs
index 9a2d80af2..1c9cc2ce1 100644
--- a/src/commands/worktree.rs
+++ b/src/commands/worktree.rs
@@ -39,7 +39,7 @@
//! /path/to/worktree # ← Automatically changed!
//! ```
//!
-//! When shell integration is enabled (`eval "$(wt init bash)"`), the shell function intercepts
+//! When shell integration is enabled (`eval "$(wt config shell init bash)"`), the shell function intercepts
//! commands and adds `--internal`:
//!
//! 1. Shell wrapper calls: `wt switch --internal my-feature`
@@ -96,7 +96,7 @@
//! # If cargo build fails, cargo test doesn't run (exit code propagates)
//! ```
//!
-//! The shell wrapper is generated by `wt init <shell>` from templates in `templates/`.
+//! The shell wrapper is generated by `wt config shell init <shell>` from templates in `templates/`.
use anyhow::{Context, bail};
use std::path::PathBuf;
diff --git a/src/main.rs b/src/main.rs
index 6cf6bdb11..5a6acfdaf 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -24,7 +24,7 @@ use commands::command_executor::CommandContext;
use commands::handle_select;
use commands::worktree::{SwitchResult, handle_push};
use commands::{
- ConfigAction, handle_config_init, handle_config_list, handle_config_refresh_cache,
+ ConfigAction, handle_config_create, handle_config_list, handle_config_refresh_cache,
handle_config_status_set, handle_config_status_unset, handle_configure_shell, handle_init,
handle_list, handle_merge, handle_rebase, handle_remove, handle_squash,
handle_standalone_ask_approvals, handle_standalone_clear_approvals, handle_standalone_commit,
@@ -32,7 +32,7 @@ use commands::{
};
use output::{execute_user_command, handle_remove_output, handle_switch_output};
-use cli::{Cli, Commands, ConfigCommand, StandaloneCommand, StatusAction};
+use cli::{Cli, Commands, ConfigCommand, ConfigShellCommand, StandaloneCommand, StatusAction};
/// Try to handle --help flag with pager before clap processes it
fn maybe_handle_help_with_pager() -> bool {
@@ -91,7 +91,7 @@ fn main() {
}
// TODO: Enhance error messages to show possible values for missing enum arguments
- // Currently `wt init` doesn't show available shells, but `wt init invalid` does.
+ // Currently `wt config shell init` doesn't show available shells, but `wt config shell init invalid` does.
// Clap doesn't support this natively yet - see https://github.com/clap-rs/clap/issues/3320
// When available, use built-in setting. Until then, could use try_parse() to intercept
// MissingRequiredArgument errors and print custom messages with ValueEnum::value_variants().
@@ -169,72 +169,80 @@ fn main() {
.init();
let result = match cli.command {
- Commands::Init {
- shell,
- command_name,
- } => {
- let mut cli_cmd = cli::build_command();
- handle_init(shell, command_name, &mut cli_cmd).map_err(|e| anyhow::anyhow!("{}", e))
- }
Commands::Config { action } => match action {
- ConfigCommand::Init => handle_config_init(),
- ConfigCommand::List => handle_config_list(),
- ConfigCommand::RefreshCache => handle_config_refresh_cache(),
- ConfigCommand::Shell {
- shell,
- force,
- command_name,
- } => {
- handle_configure_shell(shell, force, command_name)
- .map_err(|e| anyhow::anyhow!("{}", e))
- .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
+ ConfigCommand::Shell { action } => match action {
+ ConfigShellCommand::Init {
+ shell,
+ command_name,
+ } => {
+ // Generate shell code to stdout
+ let mut cli_cmd = cli::build_command();
+ handle_init(shell, command_name, &mut cli_cmd)
+ .map_err(|e| anyhow::anyhow!("{}", e))
+ }
+ ConfigShellCommand::Install {
+ shell,
+ force,
+ command_name,
+ } => {
+ // Auto-write to shell config files
+ handle_configure_shell(shell, force, command_name)
+ .map_err(|e| anyhow::anyhow!("{}", e))
+ .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 = format_path_for_display(&result.path);
+
+ println!(
+ "{} {} {bold}{shell}{bold:#} {path}",
+ result.action.emoji(),
+ 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)));
- 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 = format_path_for_display(&result.path);
-
+ let plural = if changes_count == 1 { "" } else { "s" };
println!(
- "{} {} {bold}{shell}{bold:#} {path}",
- result.action.emoji(),
- result.action.description(),
+ "{SUCCESS_EMOJI} {green}Configured {changes_count} shell{plural}{green:#}"
);
- // 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:#}"
- );
- })
- }
+ // 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:#}"
+ );
+ })
+ }
+ },
+ ConfigCommand::Create => handle_config_create(),
+ ConfigCommand::List => handle_config_list(),
+ ConfigCommand::RefreshCache => handle_config_refresh_cache(),
ConfigCommand::Status { action } => match action {
StatusAction::Set { value, branch } => handle_config_status_set(value, branch),
StatusAction::Unset { target } => handle_config_status_unset(target),
diff --git a/src/output/global.rs b/src/output/global.rs
index b74aa7c9f..ff3a359a0 100644
--- a/src/output/global.rs
+++ b/src/output/global.rs
@@ -97,7 +97,7 @@ pub fn hint(message: impl Into<String>) -> io::Result<()> {
/// Display a shell integration hint (suppressed in directive mode)
///
-/// Shell integration hints like "To enable automatic cd, run: wt config shell" are only
+/// Shell integration hints like "To enable automatic cd, run: wt config shell install" are only
/// shown in interactive mode since directive mode users already have shell integration
pub fn shell_integration_hint(message: impl Into<String>) -> io::Result<()> {
OUTPUT_CONTEXT.with(|ctx| {
diff --git a/src/output/handlers.rs b/src/output/handlers.rs
index 323456726..23fbe29e4 100644
--- a/src/output/handlers.rs
+++ b/src/output/handlers.rs
@@ -104,7 +104,7 @@ fn format_remove_message(
/// Shell integration hint message (without emoji - hint() adds it automatically)
fn shell_integration_hint() -> String {
use worktrunk::styling::HINT;
- format!("{HINT}To enable automatic cd, run: wt config shell{HINT:#}")
+ format!("{HINT}To enable automatic cd, run: wt config shell install{HINT:#}")
}
/// Handle output for a switch operation
diff --git a/src/shell.rs b/src/shell.rs
index d4e65b28e..be778a05a 100644
--- a/src/shell.rs
+++ b/src/shell.rs
@@ -108,13 +108,13 @@ impl Shell {
match self {
Self::Bash | Self::Zsh => {
format!(
- "if command -v {} >/dev/null 2>&1; then eval \"$(command {} init {})\"; fi",
+ "if command -v {} >/dev/null 2>&1; then eval \"$(command {} config shell init {})\"; fi",
cmd_prefix, cmd_prefix, self
)
}
Self::Fish => {
format!(
- "if type -q {}; command {} init {} | source; end",
+ "if type -q {}; command {} config shell init {} | source; end",
cmd_prefix, cmd_prefix, self
)
} // Disabled shells - uncomment when ready to support
diff --git a/tests/common/shell.rs b/tests/common/shell.rs
index a3fcc8b63..3b2a585bf 100644
--- a/tests/common/shell.rs
+++ b/tests/common/shell.rs
@@ -175,13 +175,13 @@ pub fn execute_shell_script(repo: &TestRepo, shell: &str, script: &str) -> Strin
String::from_utf8(output.stdout).expect("Invalid UTF-8 in output")
}
-/// Generate `wt init <shell>` output for the repo.
+/// Generate `wt config shell init <shell>` output for the repo.
pub fn generate_init_code(repo: &TestRepo, shell: &str) -> String {
let mut cmd = wt_command();
repo.clean_cli_env(&mut cmd);
let output = cmd
- .args(["init", shell])
+ .args(["config", "shell", "init", shell])
.current_dir(repo.root_path())
.output()
.expect("Failed to generate init code");
diff --git a/tests/integration_tests/completion.rs b/tests/integration_tests/completion.rs
index 5555823b3..549bb61d3 100644
--- a/tests/integration_tests/completion.rs
+++ b/tests/integration_tests/completion.rs
@@ -287,10 +287,10 @@ fn test_complete_unknown_command() {
let stdout = String::from_utf8_lossy(&output.stdout);
let suggestions = value_suggestions(&stdout);
assert!(
- suggestions.contains(&"init"),
+ suggestions.contains(&"config"),
"should fall back to root completions, got:\n{stdout}"
);
- assert!(suggestions.contains(&"config"));
+ assert!(suggestions.contains(&"list"));
});
}
@@ -343,7 +343,13 @@ fn test_complete_list_command() {
fn test_init_fish_includes_no_file_flag() {
// Test that fish init wires Clap-based completions into the template
let mut cmd = wt_command();
- let output = cmd.arg("init").arg("fish").output().unwrap();
+ let output = cmd
+ .arg("config")
+ .arg("shell")
+ .arg("init")
+ .arg("fish")
+ .output()
+ .unwrap();
assert!(output.status.success());
let stdout = String::from_utf8_lossy(&output.stdout);
@@ -770,12 +776,15 @@ fn test_complete_dev_run_hook_with_partial_input() {
}
#[test]
-fn test_complete_init_shows_shells() {
+fn test_complete_init_shell_shows_shells() {
let temp = TestRepo::new();
temp.commit("initial");
- // Test completion for init command with no input
- let output = temp.completion_cmd(&["wt", "init", ""]).output().unwrap();
+ // Test completion for config shell init command with no input
+ let output = temp
+ .completion_cmd(&["wt", "config", "shell", "init", ""])
+ .output()
+ .unwrap();
assert!(output.status.success());
let stdout = String::from_utf8_lossy(&output.stdout);
@@ -793,12 +802,15 @@ fn test_complete_init_shows_shells() {
}
#[test]
-fn test_complete_init_partial() {
+fn test_complete_init_shell_partial() {
let temp = TestRepo::new();
temp.commit("initial");
// Test completion with partial input "fi"
- let output = temp.completion_cmd(&["wt", "init", "fi"]).output().unwrap();
+ let output = temp
+ .completion_cmd(&["wt", "config", "shell", "init", "fi"])
+ .output()
+ .unwrap();
assert!(output.status.success());
let stdout = String::from_utf8_lossy(&output.stdout);
@@ -811,13 +823,13 @@ fn test_complete_init_partial() {
}
#[test]
-fn test_complete_init_with_source_flag() {
+fn test_complete_init_shell_with_source_flag() {
let temp = TestRepo::new();
temp.commit("initial");
- // Test completion with --source flag: wt --source init <tab>
+ // Test completion with --source flag: wt --source config shell init <tab>
let output = temp
- .completion_cmd(&["wt", "--source", "init", ""])
+ .completion_cmd(&["wt", "--source", "config", "shell", "init", ""])
.output()
.unwrap();
@@ -834,13 +846,13 @@ fn test_complete_init_with_source_flag() {
}
#[test]
-fn test_complete_config_shell_flag() {
+fn test_complete_init_shell_partial_z() {
let temp = TestRepo::new();
temp.commit("initial");
- // Test completion for config shell --shell flag
+ // Test completion for config shell init with partial input "z"
let output = temp
- .completion_cmd(&["wt", "config", "shell", "--shell", "z"])
+ .completion_cmd(&["wt", "config", "shell", "init", "z"])
.output()
.unwrap();
@@ -855,13 +867,13 @@ fn test_complete_config_shell_flag() {
}
#[test]
-fn test_complete_config_shell_flag_with_source() {
+fn test_complete_init_shell_all_with_source() {
let temp = TestRepo::new();
temp.commit("initial");
- // Test completion for config shell --shell flag with --source
+ // Test completion for config shell init with --source flag
let output = temp
- .completion_cmd(&["wt", "--source", "config", "shell", "--shell", ""])
+ .completion_cmd(&["wt", "--source", "config", "shell", "init", ""])
.output()
.unwrap();
diff --git a/tests/integration_tests/completion_validation.rs b/tests/integration_tests/completion_validation.rs
index fbfad4c4b..5cfa1bac0 100644
--- a/tests/integration_tests/completion_validation.rs
+++ b/tests/integration_tests/completion_validation.rs
@@ -240,18 +240,24 @@ fn validate_cross_shell(fish_content: &str, bash_content: &str, zsh_content: &st
fn test_completion_validation() {
// Generate completions
let fish_output = wt_command()
+ .arg("config")
+ .arg("shell")
.arg("init")
.arg("fish")
.output()
.expect("Failed to generate fish completion");
let bash_output = wt_command()
+ .arg("config")
+ .arg("shell")
.arg("init")
.arg("bash")
.output()
.expect("Failed to generate bash completion");
let zsh_output = wt_command()
+ .arg("config")
+ .arg("shell")
.arg("init")
.arg("zsh")
.output()
diff --git a/tests/integration_tests/config_init.rs b/tests/integration_tests/config_init.rs
index a7f5e5052..6583ece27 100644
--- a/tests/integration_tests/config_init.rs
+++ b/tests/integration_tests/config_init.rs
@@ -3,7 +3,7 @@ use insta_cmd::assert_cmd_snapshot;
use std::fs;
use tempfile::TempDir;
-/// Test `wt config init` when config already exists (should show info message with emoji)
+/// Test `wt config create` when config already exists (should show info message with emoji)
#[test]
fn test_config_init_already_exists() {
let temp_home = TempDir::new().unwrap();
@@ -21,7 +21,7 @@ fn test_config_init_already_exists() {
let settings = setup_home_snapshot_settings(&temp_home);
settings.bind(|| {
let mut cmd = wt_command();
- cmd.arg("config").arg("init");
+ cmd.arg("config").arg("create");
set_temp_home_env(&mut cmd, temp_home.path());
assert_cmd_snapshot!(cmd, @r"
@@ -37,19 +37,19 @@ fn test_config_init_already_exists() {
});
}
-/// Test `wt config init` creates new config file
+/// Test `wt config create` creates new config file
#[test]
fn test_config_init_creates_file() {
let temp_home = TempDir::new().unwrap();
- // Don't create config file - let init create it
+ // Don't create config file - let create create it
let global_config_dir = temp_home.path().join(".config").join("worktrunk");
fs::create_dir_all(&global_config_dir).unwrap();
let settings = setup_home_snapshot_settings(&temp_home);
settings.bind(|| {
let mut cmd = wt_command();
- cmd.arg("config").arg("init");
+ cmd.arg("config").arg("create");
set_temp_home_env(&mut cmd, temp_home.path());
assert_cmd_snapshot!(cmd, @r"
diff --git a/tests/integration_tests/configure_shell.rs b/tests/integration_tests/configure_shell.rs
index caca10842..d43766709 100644
--- a/tests/integration_tests/configure_shell.rs
+++ b/tests/integration_tests/configure_shell.rs
@@ -3,7 +3,7 @@ use insta_cmd::assert_cmd_snapshot;
use std::fs;
use tempfile::TempDir;
-/// Test `wt config shell` with --force flag (skips confirmation)
+/// Test `wt config shell install` with --force flag (skips confirmation)
#[test]
fn test_configure_shell_with_yes() {
let repo = TestRepo::new();
@@ -20,6 +20,7 @@ fn test_configure_shell_with_yes() {
set_temp_home_env(&mut cmd, temp_home.path());
cmd.arg("config")
.arg("shell")
+ .arg("install")
.arg("--force")
.current_dir(repo.root_path());
@@ -28,7 +29,7 @@ fn test_configure_shell_with_yes() {
exit_code: 0
----- stdout -----
✅ Added zsh ~/.zshrc
-   if command -v wt >/dev/null 2>&1; then eval "$(command wt init zsh)"; fi
+   if command -v wt >/dev/null 2>&1; then eval "$(command wt config shell init zsh)"; fi
✅ Configured 1 shell
@@ -40,10 +41,10 @@ fn test_configure_shell_with_yes() {
// Verify the file was modified
let content = fs::read_to_string(&zshrc_path).unwrap();
- assert!(content.contains("eval \"$(command wt init zsh)\""));
+ assert!(content.contains("eval \"$(command wt config shell init zsh)\""));
}
-/// Test `wt config shell` with specific shell
+/// Test `wt config shell install` with specific shell
#[test]
fn test_configure_shell_specific_shell() {
let repo = TestRepo::new();
@@ -60,7 +61,7 @@ fn test_configure_shell_specific_shell() {
set_temp_home_env(&mut cmd, temp_home.path());
cmd.arg("config")
.arg("shell")
- .arg("--shell")
+ .arg("install")
.arg("zsh")
.arg("--force")
.current_dir(repo.root_path());
@@ -70,7 +71,7 @@ fn test_configure_shell_specific_shell() {
exit_code: 0
----- stdout -----
✅ Added zsh ~/.zshrc
-   if command -v wt >/dev/null 2>&1; then eval "$(command wt init zsh)"; fi
+   if command -v wt >/dev/null 2>&1; then eval "$(command wt config shell init zsh)"; fi
✅ Configured 1 shell
@@ -82,10 +83,10 @@ fn test_configure_shell_specific_shell() {
// Verify the file was modified
let content = fs::read_to_string(&zshrc_path).unwrap();
- assert!(content.contains("eval \"$(command wt init zsh)\""));
+ assert!(content.contains("eval \"$(command wt config shell init zsh)\""));
}
-/// Test `wt config shell` when line already exists
+/// Test `wt config shell install` when line already exists
#[test]
fn test_configure_shell_already_exists() {
let repo = TestRepo::new();
@@ -95,7 +96,7 @@ fn test_configure_shell_already_exists() {
let zshrc_path = temp_home.path().join(".zshrc");
fs::write(
&zshrc_path,
- "# Existing config\nif command -v wt >/dev/null 2>&1; then eval \"$(command wt init zsh)\"; fi\n",
+ "# Existing config\nif command -v wt >/dev/null 2>&1; then eval \"$(command wt config shell init zsh)\"; fi\n",
)
.unwrap();
@@ -106,7 +107,7 @@ fn test_configure_shell_already_exists() {
set_temp_home_env(&mut cmd, temp_home.path());
cmd.arg("config")
.arg("shell")
- .arg("--shell")
+ .arg("install")
.arg("zsh")
.arg("--force")
.current_dir(repo.root_path());
@@ -123,11 +124,11 @@ fn test_configure_shell_already_exists() {
// Verify the file was not modified (no duplicate)
let content = fs::read_to_string(&zshrc_path).unwrap();
- let count = content.matches("wt init").count();
- assert_eq!(count, 1, "Should only have one wt init line");
+ let count = content.matches("wt config shell init").count();
+ assert_eq!(count, 1, "Should only have one wt config shell init line");
}
-/// Test `wt config shell` for Fish (creates new file in conf.d/)
+/// Test `wt config shell install` for Fish (creates new file in conf.d/)
#[test]
fn test_configure_shell_fish() {
let repo = TestRepo::new();
@@ -140,7 +141,7 @@ fn test_configure_shell_fish() {
set_temp_home_env(&mut cmd, temp_home.path());
cmd.arg("config")
.arg("shell")
- .arg("--shell")
+ .arg("install")
.arg("fish")
.arg("--force")
.current_dir(repo.root_path());
@@ -150,7 +151,7 @@ fn test_configure_shell_fish() {
exit_code: 0
----- stdout -----
✅ Created fish ~/.config/fish/conf.d/wt.fish
-   if type -q wt; command wt init fish | source; end
+   if type -q wt; command wt config shell init fish | source; end
✅ Configured 1 shell
@@ -166,13 +167,13 @@ fn test_configure_shell_fish() {
let content = fs::read_to_string(&fish_config).unwrap();
assert!(
- content.trim() == "if type -q wt; command wt init fish | source; end",
+ content.trim() == "if type -q wt; command wt config shell init fish | source; end",
"Should contain conditional wrapper: {}",
content
);
}
-/// Test `wt config shell` when no config files exist
+/// Test `wt config shell install` when no config files exist
#[test]
fn test_configure_shell_no_files() {
let repo = TestRepo::new();
@@ -191,6 +192,7 @@ fn test_configure_shell_no_files() {
set_temp_home_env(&mut cmd, temp_home.path());
cmd.arg("config")
.arg("shell")
+ .arg("install")
.arg("--force")
.current_dir(repo.root_path());
@@ -205,8 +207,7 @@ fn test_configure_shell_no_files() {
});
}
-/// Test `wt config shell` for Fish with custom prefix
-/// Test `wt config shell` with multiple existing config files
+/// Test `wt config shell install` with multiple existing config files
#[test]
fn test_configure_shell_multiple_configs() {
let repo = TestRepo::new();
@@ -225,6 +226,7 @@ fn test_configure_shell_multiple_configs() {
set_temp_home_env(&mut cmd, temp_home.path());
cmd.arg("config")
.arg("shell")
+ .arg("install")
.arg("--force")
.current_dir(repo.root_path());
@@ -233,9 +235,9 @@ fn test_configure_shell_multiple_configs() {
exit_code: 0
----- stdout -----
✅ Added bash ~/.bash_profile
-   if command -v wt >/dev/null 2>&1; then eval "$(command wt init bash)"; fi
+   if command -v wt >/dev/null 2>&1; then eval "$(command wt config shell init bash)"; fi
✅ Added zsh ~/.zshrc
-   if command -v wt >/dev/null 2>&1; then eval "$(command wt init zsh)"; fi
+   if command -v wt >/dev/null 2>&1; then eval "$(command wt config shell init zsh)"; fi
✅ Configured 2 shells
@@ -248,18 +250,18 @@ fn test_configure_shell_multiple_configs() {
// Verify both files were modified
let bash_content = fs::read_to_string(&bash_config_path).unwrap();
assert!(
- bash_content.contains("eval \"$(command wt init bash)\""),
+ bash_content.contains("eval \"$(command wt config shell init bash)\""),
"Bash config should be updated"
);
let zsh_content = fs::read_to_string(&zshrc_path).unwrap();
assert!(
- zsh_content.contains("eval \"$(command wt init zsh)\""),
+ zsh_content.contains("eval \"$(command wt config shell init zsh)\""),
"Zsh config should be updated"
);
}
-/// Test `wt config shell` shows both shells needing updates and already configured shells
+/// Test `wt config shell install` shows both shells needing updates and already configured shells
#[test]
fn test_configure_shell_mixed_states() {
let repo = TestRepo::new();
@@ -269,7 +271,7 @@ fn test_configure_shell_mixed_states() {
let bash_config_path = temp_home.path().join(".bash_profile");
fs::write(
&bash_config_path,
- "# Existing config\nif command -v wt >/dev/null 2>&1; then eval \"$(command wt init bash)\"; fi\n",
+ "# Existing config\nif command -v wt >/dev/null 2>&1; then eval \"$(command wt config shell init bash)\"; fi\n",
)
.unwrap();
@@ -284,6 +286,7 @@ fn test_configure_shell_mixed_states() {
set_temp_home_env(&mut cmd, temp_home.path());
cmd.arg("config")
.arg("shell")
+ .arg("install")
.arg("--force")
.current_dir(repo.root_path());
@@ -292,9 +295,9 @@ fn test_configure_shell_mixed_states() {
exit_code: 0
----- stdout -----
⚪ Already configured bash ~/.bash_profile
-   if command -v wt >/dev/null 2>&1; then eval "$(command wt init bash)"; fi
+   if command -v wt >/dev/null 2>&1; then eval "$(command wt config shell init bash)"; fi
✅ Added zsh ~/.zshrc
-   if command -v wt >/dev/null 2>&1; then eval "$(command wt init zsh)"; fi
+   if command -v wt >/dev/null 2>&1; then eval "$(command wt config shell init zsh)"; fi
✅ Configured 1 shell
@@ -306,16 +309,16 @@ fn test_configure_shell_mixed_states() {
// Verify bash was not modified (already configured)
let bash_content = fs::read_to_string(&bash_config_path).unwrap();
- let bash_wt_count = bash_content.matches("wt init").count();
+ let bash_wt_count = bash_content.matches("wt config shell init").count();
assert_eq!(
bash_wt_count, 1,
- "Bash should still have exactly one wt init line"
+ "Bash should still have exactly one wt config shell init line"
);
// Verify zsh was modified
let zsh_content = fs::read_to_string(&zshrc_path).unwrap();
assert!(
- zsh_content.contains("eval \"$(command wt init zsh)\""),
+ zsh_content.contains("eval \"$(command wt config shell init zsh)\""),
"Zsh config should be updated"
);
}
diff --git a/tests/integration_tests/help.rs b/tests/integration_tests/help.rs
index aa1bf6acc..5475a36fb 100644
--- a/tests/integration_tests/help.rs
+++ b/tests/integration_tests/help.rs
@@ -23,8 +23,8 @@ fn help_root() {
}
#[test]
-fn help_init() {
- snapshot_help("help_init", &["init", "--help"]);
+fn help_config_shell() {
+ snapshot_help("help_config_shell", &["config", "shell", "--help"]);
}
#[test]
diff --git a/tests/integration_tests/init.rs b/tests/integration_tests/init.rs
index f8d3e092e..d4f68e6d3 100644
--- a/tests/integration_tests/init.rs
+++ b/tests/integration_tests/init.rs
@@ -3,7 +3,7 @@ use insta::Settings;
use insta_cmd::assert_cmd_snapshot;
use rstest::rstest;
-/// Helper to create snapshot for init command
+/// Helper to create snapshot for config shell init command
fn snapshot_init(test_name: &str, shell: &str, extra_args: &[&str]) {
let repo = TestRepo::new();
let mut settings = Settings::clone_current();
@@ -12,7 +12,7 @@ fn snapshot_init(test_name: &str, shell: &str, extra_args: &[&str]) {
settings.bind(|| {
let mut cmd = wt_command();
repo.clean_cli_env(&mut cmd);
- cmd.arg("init").arg(shell);
+ cmd.arg("config").arg("shell").arg("init").arg(shell);
for arg in extra_args {
cmd.arg(arg);
@@ -42,7 +42,9 @@ fn test_init_invalid_shell() {
settings.bind(|| {
let mut cmd = wt_command();
repo.clean_cli_env(&mut cmd);
- cmd.arg("init")
+ cmd.arg("config")
+ .arg("shell")
+ .arg("init")
.arg("invalid-shell")
.current_dir(repo.root_path());
@@ -67,9 +69,15 @@ fn test_fish_no_duplicate_base_completion() {
let repo = TestRepo::new();
let mut cmd = wt_command();
repo.clean_cli_env(&mut cmd);
- cmd.arg("init").arg("fish").current_dir(repo.root_path());
+ cmd.arg("config")
+ .arg("shell")
+ .arg("init")
+ .arg("fish")
+ .current_dir(repo.root_path());
- let output = cmd.output().expect("Failed to run wt init fish");
+ let output = cmd
+ .output()
+ .expect("Failed to run wt config shell init fish");
let stdout = String::from_utf8_lossy(&output.stdout);
// Count how many lines contain "complete -c wt" and "-l base"
diff --git a/tests/integration_tests/shell_wrapper.rs b/tests/integration_tests/shell_wrapper.rs
index 7a01daa43..b097b2065 100644
--- a/tests/integration_tests/shell_wrapper.rs
+++ b/tests/integration_tests/shell_wrapper.rs
@@ -128,23 +128,23 @@ impl ShellOutput {
}
}
-/// Generate a shell wrapper script using the actual `wt init` command
+/// Generate a shell wrapper script using the actual `wt config shell init` command
fn generate_wrapper(repo: &TestRepo, shell: &str) -> String {
let wt_bin = get_cargo_bin("wt");
let mut cmd = Command::new(&wt_bin);
- cmd.arg("init").arg(shell);
+ cmd.arg("config").arg("shell").arg("init").arg(shell);
// Configure environment
repo.clean_cli_env(&mut cmd);
let output = cmd
.output()
- .unwrap_or_else(|_| panic!("Failed to run wt init {}", shell));
+ .unwrap_or_else(|_| panic!("Failed to run wt config shell init {}", shell));
if !output.status.success() {
panic!(
- "wt init {} failed with exit code: {:?}\nOutput:\n{}",
+ "wt config shell init {} failed with exit code: {:?}\nOutput:\n{}",
shell,
output.status.code(),
String::from_utf8_lossy(&output.stderr)
@@ -152,7 +152,7 @@ fn generate_wrapper(repo: &TestRepo, shell: &str) -> String {
}
String::from_utf8(output.stdout)
- .unwrap_or_else(|_| panic!("wt init {} produced invalid UTF-8", shell))
+ .unwrap_or_else(|_| panic!("wt config shell init {} produced invalid UTF-8", shell))
}
/// Quote a shell argument if it contains special characters
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_accept.snap b/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_accept.snap
index 7a998bd94..d4fc166ca 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_accept.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_accept.snap
@@ -14,4 +14,4 @@ y
  echo 'test command'
test command
✅ Created new worktree for test-approve from main at [REPO]/test-repo.test-approve
-💡 To enable automatic cd, run: wt config shell
+💡 To enable automatic cd, run: wt config shell install
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_decline.snap b/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_decline.snap
index 8aca362b5..64fc94adf 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_decline.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_decline.snap
@@ -12,4 +12,4 @@ n
💡 Allow and remember? [y/N]
⚪ Commands declined, continuing worktree creation
✅ Created new worktree for test-decline from main at [REPO]/test-repo.test-decline
-💡 To enable automatic cd, run: wt config shell
+💡 To enable automatic cd, run: wt config shell install
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_mixed_approved_unapproved_accept.snap b/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_mixed_approved_unapproved_accept.snap
index 9be8f95a0..8192277de 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_mixed_approved_unapproved_accept.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_mixed_approved_unapproved_accept.snap
@@ -23,4 +23,4 @@ y
  echo 'Third command'
Third command
✅ Created new worktree for test-mixed-accept from main at [REPO]/test-repo.test-mixed-accept
-💡 To enable automatic cd, run: wt config shell
+💡 To enable automatic cd, run: wt config shell install
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_mixed_approved_unapproved_decline.snap b/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_mixed_approved_unapproved_decline.snap
index 3f4b7eaf4..be88576f8 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_mixed_approved_unapproved_decline.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_mixed_approved_unapproved_decline.snap
@@ -15,4 +15,4 @@ n
💡 Allow and remember? [y/N]
⚪ Commands declined, continuing worktree creation
✅ Created new worktree for test-mixed-decline from main at [REPO]/test-repo.test-mixed-decline
-💡 To enable automatic cd, run: wt config shell
+💡 To enable automatic cd, run: wt config shell install
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_multiple_commands.snap b/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_multiple_commands.snap
index ad9c09961..834dc1763 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_multiple_commands.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_multiple_commands.snap
@@ -26,4 +26,4 @@ y
  echo 'Third command'
Third command
✅ Created new worktree for test-multi from main at [REPO]/test-repo.test-multi
-💡 To enable automatic cd, run: wt config shell
+💡 To enable automatic cd, run: wt config shell install
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_named_commands.snap b/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_named_commands.snap
index fcf7362ca..3ac0a17b9 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_named_commands.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_named_commands.snap
@@ -26,4 +26,4 @@ y
  echo 'Running tests...'
Running tests...
✅ Created new worktree for test-named from main at [REPO]/test-repo.test-named
-💡 To enable automatic cd, run: wt config shell
+💡 To enable automatic cd, run: wt config shell install
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_permission_error.snap b/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_permission_error.snap
index bcaab2c32..7594d66ed 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_permission_error.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_permission_error.snap
@@ -16,4 +16,4 @@ y
  echo 'test command'
test command
✅ Created new worktree for test-permission from main at [REPO]/test-repo.test-permission
-💡 To enable automatic cd, run: wt config shell
+💡 To enable automatic cd, run: wt config shell install
diff --git a/tests/snapshots/integration__integration_tests__approval_ui__already_approved_skip_prompt.snap b/tests/snapshots/integration__integration_tests__approval_ui__already_approved_skip_prompt.snap
index 4f4447e54..8c066282c 100644
--- a/tests/snapshots/integration__integration_tests__approval_ui__already_approved_skip_prompt.snap
+++ b/tests/snapshots/integration__integration_tests__approval_ui__already_approved_skip_prompt.snap
@@ -11,8 +11,11 @@ info:
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_COUNT: "1"
GIT_CONFIG_GLOBAL: /dev/null
+ GIT_CONFIG_KEY_0: advice.mergeConflict
GIT_CONFIG_SYSTEM: /dev/null
+ GIT_CONFIG_VALUE_0: "false"
GIT_EDITOR: ""
LANG: C
LC_ALL: C
@@ -25,7 +28,7 @@ exit_code: 0
🔄 Running post-create:
  echo 'approved' > output.txt
✅ Created new worktree for test-approved from main at [REPO].test-approved
-💡 To enable automatic cd, run: wt config shell
+💡 To enable automatic cd, run: wt config shell install
----- stderr -----

diff --git a/tests/snapshots/integration__integration_tests__approval_ui__force_bypasses_tty_check.snap b/tests/snapshots/integration__integration_tests__approval_ui__force_bypasses_tty_check.snap
index 5050d4cbb..b30ee77fe 100644
--- a/tests/snapshots/integration__integration_tests__approval_ui__force_bypasses_tty_check.snap
+++ b/tests/snapshots/integration__integration_tests__approval_ui__force_bypasses_tty_check.snap
@@ -12,8 +12,11 @@ info:
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_COUNT: "1"
GIT_CONFIG_GLOBAL: /dev/null
+ GIT_CONFIG_KEY_0: advice.mergeConflict
GIT_CONFIG_SYSTEM: /dev/null
+ GIT_CONFIG_VALUE_0: "false"
GIT_EDITOR: ""
LANG: C
LC_ALL: C
@@ -26,7 +29,7 @@ exit_code: 0
🔄 Running post-create:
  echo 'test command'
✅ Created new worktree for test-force-tty from main at [REPO].test-force-tty
-💡 To enable automatic cd, run: wt config shell
+💡 To enable automatic cd, run: wt config shell install
----- stderr -----
test command
diff --git a/tests/snapshots/integration__integration_tests__approval_ui__force_does_not_save_approvals_first_run.snap b/tests/snapshots/integration__integration_tests__approval_ui__force_does_not_save_approvals_first_run.snap
index acddc8b67..85b94c8e2 100644
--- a/tests/snapshots/integration__integration_tests__approval_ui__force_does_not_save_approvals_first_run.snap
+++ b/tests/snapshots/integration__integration_tests__approval_ui__force_does_not_save_approvals_first_run.snap
@@ -12,8 +12,11 @@ info:
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_COUNT: "1"
GIT_CONFIG_GLOBAL: /dev/null
+ GIT_CONFIG_KEY_0: advice.mergeConflict
GIT_CONFIG_SYSTEM: /dev/null
+ GIT_CONFIG_VALUE_0: "false"
GIT_EDITOR: ""
LANG: C
LC_ALL: C
@@ -26,7 +29,7 @@ exit_code: 0
🔄 Running post-create:
  echo 'test command' > output.txt
✅ Created new worktree for test-force from main at [REPO].test-force
-💡 To enable automatic cd, run: wt config shell
+💡 To enable automatic cd, run: wt config shell install
----- stderr -----

diff --git a/tests/snapshots/integration__integration_tests__help__help_config.snap b/tests/snapshots/integration__integration_tests__help__help_config.snap
index e8846c820..71b69b4a9 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config.snap
@@ -13,14 +13,14 @@ info:
success: true
exit_code: 0
----- stdout -----
-wt-config - Manage configuration
+wt-config - Manage configuration and shell integration
Usage: wt config [OPTIONS] <COMMAND>
Commands:
- init Initialize global configuration file with examples
+ shell Shell integration setup
+ create Create global configuration file
list List configuration files & locations
refresh-cache Refresh default branch from remote
- shell Configure shell integration
status Manage branch status markers
Options:
@@ -33,37 +33,39 @@ Options:
-h, --help
Print help (see a summary with '-h')
-LLM SETUP GUIDE:
-Enable AI-generated commit messages
+SETUP GUIDE:
-1. Install an LLM tool (llm, aichat)
+1. Set up shell integration
- uv tool install -U llm
+ wt config shell install
-2. Configure a model
+ Or manually add to your shell config:
+ eval "$(wt config shell init bash)"
+
+2. (Optional) Create config file
+
+ wt config create
+
+ This creates ~/.config/worktrunk/config.toml with examples.
+
+3. (Optional) Enable LLM commit messages
+
+ Install: uv tool install -U llm
+ Configure: llm keys set anthropic
+ Add to config.toml:
+ [commit-generation]
+ command = "llm"
+
+LLM SETUP DETAILS:
For Claude:
llm install llm-anthropic
llm keys set anthropic
- # Paste your API key from: https://console.anthropic.com/settings/keys
llm models default claude-3.5-sonnet
For OpenAI:
llm keys set openai
- # Paste your API key from: https://platform.openai.com/api-keys
-
-3. Test it works
-
- llm "say hello"
-
-4. Configure worktrunk
-
-Add to ~/.config/worktrunk/config.toml:
-
- [commit-generation]
- command = "llm"
-Use 'wt config init' to create the config file if it doesn't exist
Use 'wt config list' to view your current configuration
Docs: https://llm.datasette.io/ | https://github.com/sigoden/aichat
diff --git a/tests/snapshots/integration__integration_tests__help__help_init.snap b/tests/snapshots/integration__integration_tests__help__help_config_shell.snap
similarity index 62%
rename from tests/snapshots/integration__integration_tests__help__help_init.snap
rename to tests/snapshots/integration__integration_tests__help__help_config_shell.snap
index 69d8a324e..7f77bd3db 100644
--- a/tests/snapshots/integration__integration_tests__help__help_init.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_shell.snap
@@ -3,7 +3,8 @@ source: tests/integration_tests/help.rs
info:
program: wt
args:
- - init
+ - config
+ - shell
- "--help"
env:
CLICOLOR_FORCE: "1"
@@ -13,15 +14,14 @@ info:
success: true
exit_code: 0
----- stdout -----
-wt-init - Generate shell integration code
-Usage: wt init [OPTIONS] <SHELL>
+wt-config-shell - Shell integration setup
+Usage: wt config shell [OPTIONS] <COMMAND>
-Options:
- --command-name <COMMAND_NAME>
- Command name
-
- [default: wt]
+Commands:
+ init Generate shell integration code
+ install Write shell integration to config files
+Options:
-C <path>
Change working directory
diff --git a/tests/snapshots/integration__integration_tests__help__help_root.snap b/tests/snapshots/integration__integration_tests__help__help_root.snap
index 8465b4246..bd2aa8cbc 100644
--- a/tests/snapshots/integration__integration_tests__help__help_root.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_root.snap
@@ -16,8 +16,7 @@ wt - Git worktree management
Usage: wt [OPTIONS] <COMMAND>
Commands:
- init Generate shell integration code
- config Manage configuration
+ config Manage configuration and shell integration
list List worktrees and optionally branches
switch Switch to a worktree
remove Remove worktree and branch
diff --git a/tests/snapshots/integration__integration_tests__init__init_bash.snap b/tests/snapshots/integration__integration_tests__init__init_bash.snap
index 45950d014..671bda039 100644
--- a/tests/snapshots/integration__integration_tests__init__init_bash.snap
+++ b/tests/snapshots/integration__integration_tests__init__init_bash.snap
@@ -3,6 +3,8 @@ source: tests/integration_tests/init.rs
info:
program: wt
args:
+ - config
+ - shell
- init
- bash
env:
@@ -19,7 +21,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmplvmMbJ/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp6Iwk46/test-config.toml
---
success: true
exit_code: 0
@@ -189,9 +191,6 @@ _wt() {
wt,config)
cmd="wt__config"
;;
- wt,init)
- cmd="wt__init"
- ;;
wt,list)
cmd="wt__list"
;;
@@ -228,8 +227,8 @@ _wt() {
wt__beta,squash)
cmd="wt__beta__squash"
;;
- wt__config,init)
- cmd="wt__config__init"
+ wt__config,create)
+ cmd="wt__config__create"
;;
wt__config,list)
cmd="wt__config__list"
@@ -243,6 +242,12 @@ _wt() {
wt__config,status)
cmd="wt__config__status"
;;
+ wt__config__shell,init)
+ cmd="wt__config__shell__init"
+ ;;
+ wt__config__shell,install)
+ cmd="wt__config__shell__install"
+ ;;
wt__config__status,set)
cmd="wt__config__status__set"
;;
@@ -256,7 +261,7 @@ _wt() {
case "${cmd}" in
wt)
- opts="-C -v -h -V --verbose --help --version init config beta list switch remove merge"
+ opts="-C -v -h -V --verbose --help --version config beta list switch remove merge"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
@@ -436,7 +441,7 @@ _wt() {
return 0
;;
wt__config)
- opts="-C -v -h --verbose --help init list refresh-cache shell status"
+ opts="-C -v -h --verbose --help shell create list refresh-cache status"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
@@ -453,7 +458,7 @@ _wt() {
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
- wt__config__init)
+ wt__config__create)
opts="-C -v -h --verbose --help"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
@@ -508,20 +513,12 @@ _wt() {
return 0
;;
wt__config__shell)
- opts="-f -C -v -h --shell --force --command-name --verbose --help"
+ opts="-C -v -h --verbose --help init install"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
- --shell)
- COMPREPLY=($(compgen -W "bash fish zsh" -- "${cur}"))
- return 0
- ;;
- --command-name)
- COMPREPLY=($(compgen -f "${cur}"))
- return 0
- ;;
-C)
COMPREPLY=($(compgen -f "${cur}"))
return 0
@@ -533,13 +530,17 @@ _wt() {
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
- wt__config__status)
- opts="-C -v -h --verbose --help set unset"
- if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
+ wt__config__shell__init)
+ opts="-C -v -h --command-name --verbose --help bash fish zsh"
+ if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
+ --command-name)
+ COMPREPLY=($(compgen -f "${cur}"))
+ return 0
+ ;;
-C)
COMPREPLY=($(compgen -f "${cur}"))
return 0
@@ -551,14 +552,14 @@ _wt() {
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
- wt__config__status__set)
- opts="-C -v -h --branch --verbose --help <VALUE>"
+ wt__config__shell__install)
+ opts="-f -C -v -h --force --command-name --verbose --help bash fish zsh"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
- --branch)
+ --command-name)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
@@ -573,9 +574,9 @@ _wt() {
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
- wt__config__status__unset)
- opts="-C -v -h --verbose --help [TARGET]"
- if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then
+ wt__config__status)
+ opts="-C -v -h --verbose --help set unset"
+ if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
@@ -591,17 +592,35 @@ _wt() {
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
- wt__init)
- opts="-C -v -h --command-name --verbose --help bash fish zsh"
- if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
+ wt__config__status__set)
+ opts="-C -v -h --branch --verbose --help <VALUE>"
+ if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
- --command-name)
+ --branch)
+ COMPREPLY=($(compgen -f "${cur}"))
+ return 0
+ ;;
+ -C)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
+ *)
+ COMPREPLY=()
+ ;;
+ esac
+ COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
+ return 0
+ ;;
+ wt__config__status__unset)
+ opts="-C -v -h --verbose --help [TARGET]"
+ if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then
+ COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
+ return 0
+ fi
+ case "${prev}" in
-C)
COMPREPLY=($(compgen -f "${cur}"))
return 0
diff --git a/tests/snapshots/integration__integration_tests__init__init_fish.snap b/tests/snapshots/integration__integration_tests__init__init_fish.snap
index f562a9236..d0bf04066 100644
--- a/tests/snapshots/integration__integration_tests__init__init_fish.snap
+++ b/tests/snapshots/integration__integration_tests__init__init_fish.snap
@@ -3,6 +3,8 @@ source: tests/integration_tests/init.rs
info:
program: wt
args:
+ - config
+ - shell
- init
- fish
env:
@@ -19,7 +21,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpDJ4JgG/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmph2v1TR/test-config.toml
---
success: true
exit_code: 0
@@ -191,42 +193,34 @@ complete -c wt -n "__fish_wt_needs_command" -s C -d 'Change working directory' -
complete -c wt -n "__fish_wt_needs_command" -s v -l verbose -d 'Show commands and debug info'
complete -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 "config" -d 'Manage configuration'
+complete -c wt -n "__fish_wt_needs_command" -f -a "config" -d 'Manage configuration and shell integration'
complete -c wt -n "__fish_wt_needs_command" -f -a "beta" -d 'Development and testing utilities'
complete -c wt -n "__fish_wt_needs_command" -f -a "list" -d 'List worktrees and optionally branches'
complete -c wt -n "__fish_wt_needs_command" -f -a "switch" -d 'Switch to a worktree'
complete -c wt -n "__fish_wt_needs_command" -f -a "remove" -d 'Remove worktree and branch'
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 command-name -d 'Command name' -r
-complete -c wt -n "__fish_wt_using_subcommand init" -s C -d 'Change working directory' -r -F
-complete -c wt -n "__fish_wt_using_subcommand init" -s v -l verbose -d 'Show 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 config; and not __fish_seen_subcommand_from init list refresh-cache shell status" -s C -d 'Change working directory' -r -F
-complete -c wt -n "__fish_wt_using_subcommand config; and not __fish_seen_subcommand_from init list refresh-cache shell status" -s v -l verbose -d 'Show commands and debug info'
-complete -c wt -n "__fish_wt_using_subcommand config; and not __fish_seen_subcommand_from init list refresh-cache shell status" -s h -l help -d 'Print help (see more with \'--help\')'
-complete -c wt -n "__fish_wt_using_subcommand config; and not __fish_seen_subcommand_from init list refresh-cache shell status" -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 refresh-cache shell status" -f -a "list" -d 'List configuration files & locations'
-complete -c wt -n "__fish_wt_using_subcommand config; and not __fish_seen_subcommand_from init list refresh-cache shell status" -f -a "refresh-cache" -d 'Refresh default branch from remote'
-complete -c wt -n "__fish_wt_using_subcommand config; and not __fish_seen_subcommand_from init list refresh-cache shell status" -f -a "shell" -d 'Configure shell integration'
-complete -c wt -n "__fish_wt_using_subcommand config; and not __fish_seen_subcommand_from init list refresh-cache shell status" -f -a "status" -d 'Manage branch status markers'
-complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from init" -s C -d 'Change working directory' -r -F
-complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from init" -s v -l verbose -d 'Show 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 not __fish_seen_subcommand_from shell create list refresh-cache status" -s C -d 'Change working directory' -r -F
+complete -c wt -n "__fish_wt_using_subcommand config; and not __fish_seen_subcommand_from shell create list refresh-cache status" -s v -l verbose -d 'Show commands and debug info'
+complete -c wt -n "__fish_wt_using_subcommand config; and not __fish_seen_subcommand_from shell create list refresh-cache status" -s h -l help -d 'Print help (see more with \'--help\')'
+complete -c wt -n "__fish_wt_using_subcommand config; and not __fish_seen_subcommand_from shell create list refresh-cache status" -f -a "shell" -d 'Shell integration setup'
+complete -c wt -n "__fish_wt_using_subcommand config; and not __fish_seen_subcommand_from shell create list refresh-cache status" -f -a "create" -d 'Create global configuration file'
+complete -c wt -n "__fish_wt_using_subcommand config; and not __fish_seen_subcommand_from shell create list refresh-cache status" -f -a "list" -d 'List configuration files & locations'
+complete -c wt -n "__fish_wt_using_subcommand config; and not __fish_seen_subcommand_from shell create list refresh-cache status" -f -a "refresh-cache" -d 'Refresh default branch from remote'
+complete -c wt -n "__fish_wt_using_subcommand config; and not __fish_seen_subcommand_from shell create list refresh-cache status" -f -a "status" -d 'Manage branch status markers'
+complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from shell" -s C -d 'Change working directory' -r -F
+complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from shell" -s v -l verbose -d 'Show 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 config; and __fish_seen_subcommand_from shell" -f -a "init" -d 'Generate shell integration code'
+complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from shell" -f -a "install" -d 'Write shell integration to config files'
+complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from create" -s C -d 'Change working directory' -r -F
+complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from create" -s v -l verbose -d 'Show commands and debug info'
+complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from create" -s h -l help -d 'Print help'
complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from list" -s C -d 'Change working directory' -r -F
complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from list" -s v -l verbose -d 'Show 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 refresh-cache" -s C -d 'Change working directory' -r -F
complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from refresh-cache" -s v -l verbose -d 'Show commands and debug info'
complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from refresh-cache" -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 'Shell to configure' -r -f -a "bash\t''
-fish\t''
-zsh\t''"
-complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from shell" -l command-name -d 'Command name' -r
-complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from shell" -s C -d 'Change working directory' -r -F
-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 'Show 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 (see more with \'--help\')'
complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from status" -s C -d 'Change working directory' -r -F
complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from status" -s v -l verbose -d 'Show commands and debug info'
complete -c wt -n "__fish_wt_using_subcommand config; and __fish_seen_subcommand_from status" -s h -l help -d 'Print help'
diff --git a/tests/snapshots/integration__integration_tests__init__init_zsh.snap b/tests/snapshots/integration__integration_tests__init__init_zsh.snap
index 8ffe0b792..3a65a7ee8 100644
--- a/tests/snapshots/integration__integration_tests__init__init_zsh.snap
+++ b/tests/snapshots/integration__integration_tests__init__init_zsh.snap
@@ -3,6 +3,8 @@ source: tests/integration_tests/init.rs
info:
program: wt
args:
+ - config
+ - shell
- init
- zsh
env:
@@ -19,7 +21,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmptZYPNz/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp0Vu0V6/test-config.toml
---
success: true
exit_code: 0
@@ -200,18 +202,7 @@ _wt() {
(( CURRENT += 1 ))
curcontext="${curcontext%:*:*}:wt-command-$line[1]:"
case $line[1] in
- (init)
-_arguments "${_arguments_options[@]}" : \
-'--command-name=[Command name]:COMMAND_NAME:_default' \
-'-C+[Change working directory]:path:_files' \
-'-v[Show commands and debug info]' \
-'--verbose[Show commands and debug info]' \
-'-h[Print help]' \
-'--help[Print help]' \
-':shell -- Shell to generate code for:(bash fish zsh)' \
-&& ret=0
-;;
-(config)
+ (config)
_arguments "${_arguments_options[@]}" : \
'-C+[Change working directory]:path:_files' \
'-v[Show commands and debug info]' \
@@ -228,16 +219,52 @@ _arguments "${_arguments_options[@]}" : \
(( CURRENT += 1 ))
curcontext="${curcontext%:*:*}:wt-config-command-$line[1]:"
case $line[1] in
- (init)
+ (shell)
_arguments "${_arguments_options[@]}" : \
'-C+[Change working directory]:path:_files' \
'-v[Show commands and debug info]' \
'--verbose[Show commands and debug info]' \
'-h[Print help]' \
'--help[Print help]' \
+":: :_wt__config__shell_commands" \
+"*::: :->shell" \
+&& ret=0
+
+ case $state in
+ (shell)
+ words=($line[1] "${words[@]}")
+ (( CURRENT += 1 ))
+ curcontext="${curcontext%:*:*}:wt-config-shell-command-$line[1]:"
+ case $line[1] in
+ (init)
+_arguments "${_arguments_options[@]}" : \
+'--command-name=[Command name]:COMMAND_NAME:_default' \
+'-C+[Change working directory]:path:_files' \
+'-v[Show commands and debug info]' \
+'--verbose[Show commands and debug info]' \
+'-h[Print help (see more with '\''--help'\'')]' \
+'--help[Print help (see more with '\''--help'\'')]' \
+':shell -- Shell to generate code for:(bash fish zsh)' \
&& ret=0
;;
-(list)
+(install)
+_arguments "${_arguments_options[@]}" : \
+'--command-name=[Command name]:COMMAND_NAME:_default' \
+'-C+[Change working directory]:path:_files' \
+'-f[Skip confirmation prompt]' \
+'--force[Skip confirmation prompt]' \
+'-v[Show commands and debug info]' \
+'--verbose[Show commands and debug info]' \
+'-h[Print help (see more with '\''--help'\'')]' \
+'--help[Print help (see more with '\''--help'\'')]' \
+'::shell -- Shell to install (default\: auto-detect):(bash fish zsh)' \
+&& ret=0
+;;
+ esac
+ ;;
+esac
+;;
+(create)
_arguments "${_arguments_options[@]}" : \
'-C+[Change working directory]:path:_files' \
'-v[Show commands and debug info]' \
@@ -246,7 +273,7 @@ _arguments "${_arguments_options[@]}" : \
'--help[Print help]' \
&& ret=0
;;
-(refresh-cache)
+(list)
_arguments "${_arguments_options[@]}" : \
'-C+[Change working directory]:path:_files' \
'-v[Show commands and debug info]' \
@@ -255,17 +282,13 @@ _arguments "${_arguments_options[@]}" : \
'--help[Print help]' \
&& ret=0
;;
-(shell)
+(refresh-cache)
_arguments "${_arguments_options[@]}" : \
-'--shell=[Shell to configure]:SHELL:(bash fish zsh)' \
-'--command-name=[Command name]:COMMAND_NAME:_default' \
'-C+[Change working directory]:path:_files' \
-'-f[Skip confirmation prompt]' \
-'--force[Skip confirmation prompt]' \
'-v[Show commands and debug info]' \
'--verbose[Show commands and debug info]' \
-'-h[Print help (see more with '\''--help'\'')]' \
-'--help[Print help (see more with '\''--help'\'')]' \
+'-h[Print help]' \
+'--help[Print help]' \
&& ret=0
;;
(status)
@@ -498,8 +521,7 @@ esac
(( $+functions[_wt_commands] )) ||
_wt_commands() {
local commands; commands=(
-'init:Generate shell integration code' \
-'config:Manage configuration' \
+'config:Manage configuration and shell integration' \
'beta:Development and testing utilities' \
'list:List worktrees and optionally branches' \
'switch:Switch to a worktree' \
@@ -565,18 +587,18 @@ _wt__beta__squash_commands() {
(( $+functions[_wt__config_commands] )) ||
_wt__config_commands() {
local commands; commands=(
-'init:Initialize global configuration file with examples' \
+'shell:Shell integration setup' \
+'create:Create global configuration file' \
'list:List configuration files & locations' \
'refresh-cache:Refresh default branch from remote' \
-'shell:Configure shell integration' \
'status:Manage branch status markers' \
)
_describe -t commands 'wt config commands' commands "$@"
}
-(( $+functions[_wt__config__init_commands] )) ||
-_wt__config__init_commands() {
+(( $+functions[_wt__config__create_commands] )) ||
+_wt__config__create_commands() {
local commands; commands=()
- _describe -t commands 'wt config init commands' commands "$@"
+ _describe -t commands 'wt config create commands' commands "$@"
}
(( $+functions[_wt__config__list_commands] )) ||
_wt__config__list_commands() {
@@ -590,9 +612,22 @@ _wt__config__refresh-cache_commands() {
}
(( $+functions[_wt__config__shell_commands] )) ||
_wt__config__shell_commands() {
- local commands; commands=()
+ local commands; commands=(
+'init:Generate shell integration code' \
+'install:Write shell integration to config files' \
+ )
_describe -t commands 'wt config shell commands' commands "$@"
}
+(( $+functions[_wt__config__shell__init_commands] )) ||
+_wt__config__shell__init_commands() {
+ local commands; commands=()
+ _describe -t commands 'wt config shell init commands' commands "$@"
+}
+(( $+functions[_wt__config__shell__install_commands] )) ||
+_wt__config__shell__install_commands() {
+ local commands; commands=()
+ _describe -t commands 'wt config shell install commands' commands "$@"
+}
(( $+functions[_wt__config__status_commands] )) ||
_wt__config__status_commands() {
local commands; commands=(
@@ -611,11 +646,6 @@ _wt__config__status__unset_commands() {
local commands; commands=()
_describe -t commands 'wt config status unset commands' commands "$@"
}
-(( $+functions[_wt__init_commands] )) ||
-_wt__init_commands() {
- local commands; commands=()
- _describe -t commands 'wt init commands' commands "$@"
-}
(( $+functions[_wt__list_commands] )) ||
_wt__list_commands() {
local commands; commands=()
diff --git a/tests/snapshots/integration__integration_tests__merge__readme_example_hooks_post_create.snap b/tests/snapshots/integration__integration_tests__merge__readme_example_hooks_post_create.snap
index 3c05fd808..e191cfb9b 100644
--- a/tests/snapshots/integration__integration_tests__merge__readme_example_hooks_post_create.snap
+++ b/tests/snapshots/integration__integration_tests__merge__readme_example_hooks_post_create.snap
@@ -12,8 +12,11 @@ info:
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_COUNT: "1"
GIT_CONFIG_GLOBAL: /dev/null
+ GIT_CONFIG_KEY_0: advice.mergeConflict
GIT_CONFIG_SYSTEM: /dev/null
+ GIT_CONFIG_VALUE_0: "false"
GIT_EDITOR: ""
LANG: C
LC_ALL: C
@@ -27,7 +30,7 @@ exit_code: 0
🔄 Running post-create install:
  uv sync
✅ Created new worktree for feature-x from main at [REPO].feature-x
-💡 To enable automatic cd, run: wt config shell
+💡 To enable automatic cd, run: wt config shell install
🔄 Running post-start dev:
  uv run dev
diff --git a/tests/snapshots/integration__integration_tests__merge__readme_example_simple_switch.snap b/tests/snapshots/integration__integration_tests__merge__readme_example_simple_switch.snap
index c3e95bc01..028acde84 100644
--- a/tests/snapshots/integration__integration_tests__merge__readme_example_simple_switch.snap
+++ b/tests/snapshots/integration__integration_tests__merge__readme_example_simple_switch.snap
@@ -9,11 +9,13 @@ info:
env:
CLICOLOR_FORCE: "1"
COLUMNS: "150"
- GIT_ASKPASS: ""
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_COUNT: "1"
GIT_CONFIG_GLOBAL: /dev/null
+ GIT_CONFIG_KEY_0: advice.mergeConflict
GIT_CONFIG_SYSTEM: /dev/null
+ GIT_CONFIG_VALUE_0: "false"
GIT_EDITOR: ""
LANG: C
LC_ALL: C
@@ -24,6 +26,6 @@ success: true
exit_code: 0
----- stdout -----
✅ Created new worktree for fix-auth from main at [REPO].fix-auth
-💡 To enable automatic cd, run: wt config shell
+💡 To enable automatic cd, run: wt config shell install
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__both_create_and_start.snap b/tests/snapshots/integration__integration_tests__post_start_commands__both_create_and_start.snap
index 14bc1ec08..dd2f069da 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
@@ -11,8 +11,11 @@ info:
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_COUNT: "1"
GIT_CONFIG_GLOBAL: /dev/null
+ GIT_CONFIG_KEY_0: advice.mergeConflict
GIT_CONFIG_SYSTEM: /dev/null
+ GIT_CONFIG_VALUE_0: "false"
GIT_EDITOR: ""
LANG: C
LC_ALL: C
@@ -25,7 +28,7 @@ exit_code: 0
🔄 Running post-create:
  echo 'Setup done' > setup.txt
✅ Created new worktree for feature from main at [REPO].feature
-💡 To enable automatic cd, run: wt config shell
+💡 To enable automatic cd, run: wt config shell install
🔄 Running post-start server:
  sleep 0.05 && echo 'Server running' > server.txt
diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_failing_command.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_failing_command.snap
index d3ed559bf..0aff76226 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
@@ -11,8 +11,11 @@ info:
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_COUNT: "1"
GIT_CONFIG_GLOBAL: /dev/null
+ GIT_CONFIG_KEY_0: advice.mergeConflict
GIT_CONFIG_SYSTEM: /dev/null
+ GIT_CONFIG_VALUE_0: "false"
GIT_EDITOR: ""
LANG: C
LC_ALL: C
@@ -26,7 +29,7 @@ exit_code: 0
  exit 1
🟡 Command failed: exit status: 1
✅ Created new worktree for feature from main at [REPO].feature
-💡 To enable automatic cd, run: wt config shell
+💡 To enable automatic cd, run: wt config shell install
----- 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.snap
index fe8b69f08..ccdcdd18c 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
@@ -11,8 +11,11 @@ info:
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_COUNT: "1"
GIT_CONFIG_GLOBAL: /dev/null
+ GIT_CONFIG_KEY_0: advice.mergeConflict
GIT_CONFIG_SYSTEM: /dev/null
+ GIT_CONFIG_VALUE_0: "false"
GIT_EDITOR: ""
LANG: C
LC_ALL: C
@@ -29,7 +32,7 @@ exit_code: 0
  echo 'File exists' > result.txt
  fi
✅ Created new worktree for feature from main at [REPO].feature
-💡 To enable automatic cd, run: wt config shell
+💡 To enable automatic cd, run: wt config shell install
----- 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.snap
index bbec19d25..95eab3689 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
@@ -11,8 +11,11 @@ info:
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_COUNT: "1"
GIT_CONFIG_GLOBAL: /dev/null
+ GIT_CONFIG_KEY_0: advice.mergeConflict
GIT_CONFIG_SYSTEM: /dev/null
+ GIT_CONFIG_VALUE_0: "false"
GIT_EDITOR: ""
LANG: C
LC_ALL: C
@@ -27,7 +30,7 @@ exit_code: 0
🔄 Running post-create:
  echo 'Second'
✅ Created new worktree for feature from main at [REPO].feature
-💡 To enable automatic cd, run: wt config shell
+💡 To enable automatic cd, run: wt config shell install
----- stderr -----
First
diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_named_commands.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_named_commands.snap
index e66c71c74..7928b9656 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
@@ -11,8 +11,11 @@ info:
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_COUNT: "1"
GIT_CONFIG_GLOBAL: /dev/null
+ GIT_CONFIG_KEY_0: advice.mergeConflict
GIT_CONFIG_SYSTEM: /dev/null
+ GIT_CONFIG_VALUE_0: "false"
GIT_EDITOR: ""
LANG: C
LC_ALL: C
@@ -27,7 +30,7 @@ exit_code: 0
🔄 Running post-create setup:
  echo 'Running setup'
✅ Created new worktree for feature from main at [REPO].feature
-💡 To enable automatic cd, run: wt config shell
+💡 To enable automatic cd, run: wt config shell install
----- stderr -----
Installing deps
diff --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.snap
index 52e8cffcb..0e6d9ecf1 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
@@ -11,8 +11,11 @@ info:
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_COUNT: "1"
GIT_CONFIG_GLOBAL: /dev/null
+ GIT_CONFIG_KEY_0: advice.mergeConflict
GIT_CONFIG_SYSTEM: /dev/null
+ GIT_CONFIG_VALUE_0: "false"
GIT_EDITOR: ""
LANG: C
LC_ALL: C
@@ -23,6 +26,6 @@ success: true
exit_code: 0
----- stdout -----
✅ Created new worktree for feature from main at [REPO].feature
-💡 To enable automatic cd, run: wt config shell
+💡 To enable automatic cd, run: wt config shell install
----- 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.snap
index 7e42778cc..704cc8a70 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
@@ -11,8 +11,11 @@ info:
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_COUNT: "1"
GIT_CONFIG_GLOBAL: /dev/null
+ GIT_CONFIG_KEY_0: advice.mergeConflict
GIT_CONFIG_SYSTEM: /dev/null
+ GIT_CONFIG_VALUE_0: "false"
GIT_EDITOR: ""
LANG: C
LC_ALL: C
@@ -25,7 +28,7 @@ exit_code: 0
🔄 Running post-create:
  echo 'Setup complete'
✅ Created new worktree for feature from main at [REPO].feature
-💡 To enable automatic cd, run: wt config shell
+💡 To enable automatic cd, run: wt config shell install
----- stderr -----
Setup complete
diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_template_expansion.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_template_expansion.snap
index e37dfdfd2..298ad45dd 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
@@ -11,8 +11,11 @@ info:
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_COUNT: "1"
GIT_CONFIG_GLOBAL: /dev/null
+ GIT_CONFIG_KEY_0: advice.mergeConflict
GIT_CONFIG_SYSTEM: /dev/null
+ GIT_CONFIG_VALUE_0: "false"
GIT_EDITOR: ""
LANG: C
LC_ALL: C
@@ -31,7 +34,7 @@ exit_code: 0
🔄 Running post-create:
  echo 'Root: [REPO]' >> info.txt
✅ Created new worktree for feature/test from main at [REPO].feature-test
-💡 To enable automatic cd, run: wt config shell
+💡 To enable automatic cd, run: wt config shell install
----- 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.snap
index 3784b75f9..6a5255cbc 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
@@ -11,8 +11,11 @@ info:
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_COUNT: "1"
GIT_CONFIG_GLOBAL: /dev/null
+ GIT_CONFIG_KEY_0: advice.mergeConflict
GIT_CONFIG_SYSTEM: /dev/null
+ GIT_CONFIG_VALUE_0: "false"
GIT_EDITOR: ""
LANG: C
LC_ALL: C
@@ -23,7 +26,7 @@ success: true
exit_code: 0
----- stdout -----
✅ Created new worktree for feature from main at [REPO].feature
-💡 To enable automatic cd, run: wt config shell
+💡 To enable automatic cd, run: wt config shell install
🔄 Running post-start:
  echo 'line1
  line2
diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_create_with_command.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_create_with_command.snap
index 9d4e31e11..796f46032 100644
--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_create_with_command.snap
+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_create_with_command.snap
@@ -11,8 +11,11 @@ info:
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_COUNT: "1"
GIT_CONFIG_GLOBAL: /dev/null
+ GIT_CONFIG_KEY_0: advice.mergeConflict
GIT_CONFIG_SYSTEM: /dev/null
+ GIT_CONFIG_VALUE_0: "false"
GIT_EDITOR: ""
LANG: C
LC_ALL: C
@@ -23,7 +26,7 @@ success: true
exit_code: 0
----- stdout -----
✅ Created new worktree for feature from main at [REPO].feature
-💡 To enable automatic cd, run: wt config shell
+💡 To enable automatic cd, run: wt config shell install
🔄 Running post-start:
  echo 'POST-START-RAN' > post_start_marker.txt
diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_invalid_command.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_invalid_command.snap
index f80dc143e..0d50b8a6d 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
@@ -11,8 +11,11 @@ info:
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_COUNT: "1"
GIT_CONFIG_GLOBAL: /dev/null
+ GIT_CONFIG_KEY_0: advice.mergeConflict
GIT_CONFIG_SYSTEM: /dev/null
+ GIT_CONFIG_VALUE_0: "false"
GIT_EDITOR: ""
LANG: C
LC_ALL: C
@@ -23,7 +26,7 @@ success: true
exit_code: 0
----- stdout -----
✅ Created new worktree for feature from main at [REPO].feature
-💡 To enable automatic cd, run: wt config shell
+💡 To enable automatic cd, run: wt config shell install
🔄 Running post-start:
  echo 'unclosed quote
diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_log_captures_output.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_log_captures_output.snap
index f1d852da3..54ecf4abb 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
@@ -11,8 +11,11 @@ info:
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_COUNT: "1"
GIT_CONFIG_GLOBAL: /dev/null
+ GIT_CONFIG_KEY_0: advice.mergeConflict
GIT_CONFIG_SYSTEM: /dev/null
+ GIT_CONFIG_VALUE_0: "false"
GIT_EDITOR: ""
LANG: C
LC_ALL: C
@@ -23,7 +26,7 @@ success: true
exit_code: 0
----- stdout -----
✅ Created new worktree for feature from main at [REPO].feature
-💡 To enable automatic cd, run: wt config shell
+💡 To enable automatic cd, run: wt config shell install
🔄 Running post-start:
  echo 'stdout output' && echo 'stderr output' >&2
diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiline_with_newlines.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiline_with_newlines.snap
index 589d89ded..de78cd1a4 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
@@ -11,8 +11,11 @@ info:
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_COUNT: "1"
GIT_CONFIG_GLOBAL: /dev/null
+ GIT_CONFIG_KEY_0: advice.mergeConflict
GIT_CONFIG_SYSTEM: /dev/null
+ GIT_CONFIG_VALUE_0: "false"
GIT_EDITOR: ""
LANG: C
LC_ALL: C
@@ -23,7 +26,7 @@ success: true
exit_code: 0
----- stdout -----
✅ Created new worktree for feature from main at [REPO].feature
-💡 To enable automatic cd, run: wt config shell
+💡 To enable automatic cd, run: wt config shell install
🔄 Running post-start:
  echo 'first line' > multiline.txt
  echo 'second line' >> multiline.txt
diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiple_background.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiple_background.snap
index 28f4a848d..1229e3f30 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
@@ -11,8 +11,11 @@ info:
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_COUNT: "1"
GIT_CONFIG_GLOBAL: /dev/null
+ GIT_CONFIG_KEY_0: advice.mergeConflict
GIT_CONFIG_SYSTEM: /dev/null
+ GIT_CONFIG_VALUE_0: "false"
GIT_EDITOR: ""
LANG: C
LC_ALL: C
@@ -23,7 +26,7 @@ success: true
exit_code: 0
----- stdout -----
✅ Created new worktree for feature from main at [REPO].feature
-💡 To enable automatic cd, run: wt config shell
+💡 To enable automatic cd, run: wt config shell install
🔄 Running post-start task1:
  echo 'Task 1 running' > task1.txt
🔄 Running post-start task2:
diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_separate_logs.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_separate_logs.snap
index 3d3e07976..d22b734de 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
@@ -11,8 +11,11 @@ info:
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_COUNT: "1"
GIT_CONFIG_GLOBAL: /dev/null
+ GIT_CONFIG_KEY_0: advice.mergeConflict
GIT_CONFIG_SYSTEM: /dev/null
+ GIT_CONFIG_VALUE_0: "false"
GIT_EDITOR: ""
LANG: C
LC_ALL: C
@@ -23,7 +26,7 @@ success: true
exit_code: 0
----- stdout -----
✅ Created new worktree for feature from main at [REPO].feature
-💡 To enable automatic cd, run: wt config shell
+💡 To enable automatic cd, run: wt config shell install
🔄 Running post-start task1:
  echo 'TASK1_OUTPUT'
🔄 Running post-start task2:
diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_single_background.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_single_background.snap
index aaf00d601..b52ab8bb9 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
@@ -11,8 +11,11 @@ info:
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_COUNT: "1"
GIT_CONFIG_GLOBAL: /dev/null
+ GIT_CONFIG_KEY_0: advice.mergeConflict
GIT_CONFIG_SYSTEM: /dev/null
+ GIT_CONFIG_VALUE_0: "false"
GIT_EDITOR: ""
LANG: C
LC_ALL: C
@@ -23,7 +26,7 @@ success: true
exit_code: 0
----- stdout -----
✅ Created new worktree for feature from main at [REPO].feature
-💡 To enable automatic cd, run: wt config shell
+💡 To enable automatic cd, run: wt config shell install
🔄 Running post-start:
  sleep 0.1 && echo 'Background task done' > background.txt
diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_skip_existing.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_skip_existing.snap
index c9e8b41b4..b5a57939a 100644
--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_skip_existing.snap
+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_skip_existing.snap
@@ -10,8 +10,11 @@ info:
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_COUNT: "1"
GIT_CONFIG_GLOBAL: /dev/null
+ GIT_CONFIG_KEY_0: advice.mergeConflict
GIT_CONFIG_SYSTEM: /dev/null
+ GIT_CONFIG_VALUE_0: "false"
GIT_EDITOR: ""
LANG: C
LC_ALL: C
@@ -22,6 +25,6 @@ success: true
exit_code: 0
----- stdout -----
✅ Switched to worktree for feature at [REPO].feature
-💡 To enable automatic cd, run: wt config shell
+💡 To enable automatic cd, run: wt config shell install
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__switch__create_with_base_main.snap b/tests/snapshots/integration__integration_tests__switch__create_with_base_main.snap
index cf06abdac..fdd307014 100644
--- a/tests/snapshots/integration__integration_tests__switch__create_with_base_main.snap
+++ b/tests/snapshots/integration__integration_tests__switch__create_with_base_main.snap
@@ -13,8 +13,11 @@ info:
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_COUNT: "1"
GIT_CONFIG_GLOBAL: /dev/null
+ GIT_CONFIG_KEY_0: advice.mergeConflict
GIT_CONFIG_SYSTEM: /dev/null
+ GIT_CONFIG_VALUE_0: "false"
GIT_EDITOR: ""
LANG: C
LC_ALL: C
@@ -25,6 +28,6 @@ success: true
exit_code: 0
----- stdout -----
✅ Created new worktree for new-feature from main at [REPO].new-feature
-💡 To enable automatic cd, run: wt config shell
+💡 To enable automatic cd, run: wt config shell install
----- 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.snap
index 7c31d021c..0ea00d5f8 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
@@ -12,8 +12,11 @@ info:
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_COUNT: "1"
GIT_CONFIG_GLOBAL: /dev/null
+ GIT_CONFIG_KEY_0: advice.mergeConflict
GIT_CONFIG_SYSTEM: /dev/null
+ GIT_CONFIG_VALUE_0: "false"
GIT_EDITOR: ""
LANG: C
LC_ALL: C
@@ -25,6 +28,6 @@ exit_code: 0
----- stdout -----
🟡 --base flag is only used with --create, ignoring
⚪ Already on worktree for main at [REPO]
-💡 To enable automatic cd, run: wt config shell
+💡 To enable automatic cd, run: wt config shell install
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_create_new.snap b/tests/snapshots/integration__integration_tests__switch__switch_create_new.snap
index 0c123fa28..a8029ee8c 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_create_new.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_create_new.snap
@@ -11,8 +11,11 @@ info:
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_COUNT: "1"
GIT_CONFIG_GLOBAL: /dev/null
+ GIT_CONFIG_KEY_0: advice.mergeConflict
GIT_CONFIG_SYSTEM: /dev/null
+ GIT_CONFIG_VALUE_0: "false"
GIT_EDITOR: ""
LANG: C
LC_ALL: C
@@ -23,6 +26,6 @@ success: true
exit_code: 0
----- stdout -----
✅ Created new worktree for feature-x from main at [REPO].feature-x
-💡 To enable automatic cd, run: wt config shell
+💡 To enable automatic cd, run: wt config shell install
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_create_no_remote.snap b/tests/snapshots/integration__integration_tests__switch__switch_create_no_remote.snap
index 9b1ca552a..cb6a78a70 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_create_no_remote.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_create_no_remote.snap
@@ -11,8 +11,11 @@ info:
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_COUNT: "1"
GIT_CONFIG_GLOBAL: /dev/null
+ GIT_CONFIG_KEY_0: advice.mergeConflict
GIT_CONFIG_SYSTEM: /dev/null
+ GIT_CONFIG_VALUE_0: "false"
GIT_EDITOR: ""
LANG: C
LC_ALL: C
@@ -23,6 +26,6 @@ success: true
exit_code: 0
----- stdout -----
✅ Created new worktree for feature from main at [REPO].feature
-💡 To enable automatic cd, run: wt config shell
+💡 To enable automatic cd, run: wt config shell install
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_create_remote_only.snap b/tests/snapshots/integration__integration_tests__switch__switch_create_remote_only.snap
index 944fea3e7..d7edbcae3 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_create_remote_only.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_create_remote_only.snap
@@ -11,8 +11,11 @@ info:
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_COUNT: "1"
GIT_CONFIG_GLOBAL: /dev/null
+ GIT_CONFIG_KEY_0: advice.mergeConflict
GIT_CONFIG_SYSTEM: /dev/null
+ GIT_CONFIG_VALUE_0: "false"
GIT_EDITOR: ""
LANG: C
LC_ALL: C
@@ -23,6 +26,6 @@ success: true
exit_code: 0
----- stdout -----
✅ Created new worktree for remote-feature from main at [REPO].remote-feature
-💡 To enable automatic cd, run: wt config shell
+💡 To enable automatic cd, run: wt config shell install
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_default_branch_missing_worktree.snap b/tests/snapshots/integration__integration_tests__switch__switch_default_branch_missing_worktree.snap
index 62c4d2cdc..202e41c3a 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_default_branch_missing_worktree.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_default_branch_missing_worktree.snap
@@ -25,6 +25,6 @@ success: true
exit_code: 0
----- stdout -----
✅ Switched to worktree for main at [REPO].main
-💡 To enable automatic cd, run: wt config shell
+💡 To enable automatic cd, run: wt config shell install
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_existing_branch.snap b/tests/snapshots/integration__integration_tests__switch__switch_existing_branch.snap
index d1def6e97..309170647 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_existing_branch.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_existing_branch.snap
@@ -10,8 +10,11 @@ info:
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_COUNT: "1"
GIT_CONFIG_GLOBAL: /dev/null
+ GIT_CONFIG_KEY_0: advice.mergeConflict
GIT_CONFIG_SYSTEM: /dev/null
+ GIT_CONFIG_VALUE_0: "false"
GIT_EDITOR: ""
LANG: C
LC_ALL: C
@@ -22,6 +25,6 @@ success: true
exit_code: 0
----- stdout -----
✅ Switched to worktree for feature-z at [WORKTREE_FEATURE_Z]
-💡 To enable automatic cd, run: wt config shell
+💡 To enable automatic cd, run: wt config shell install
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_main_branch.snap b/tests/snapshots/integration__integration_tests__switch__switch_main_branch.snap
index c4f4b5fa6..003307196 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_main_branch.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_main_branch.snap
@@ -10,8 +10,11 @@ info:
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_COUNT: "1"
GIT_CONFIG_GLOBAL: /dev/null
+ GIT_CONFIG_KEY_0: advice.mergeConflict
GIT_CONFIG_SYSTEM: /dev/null
+ GIT_CONFIG_VALUE_0: "false"
GIT_EDITOR: ""
LANG: C
LC_ALL: C
@@ -22,6 +25,6 @@ success: true
exit_code: 0
----- stdout -----
⚪ Already on worktree for main at [REPO]
-💡 To enable automatic cd, run: wt config shell
+💡 To enable automatic cd, run: wt config shell install
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_main_branch_to_feature.snap b/tests/snapshots/integration__integration_tests__switch__switch_main_branch_to_feature.snap
index 331f20ad0..72d710bf1 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_main_branch_to_feature.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_main_branch_to_feature.snap
@@ -10,8 +10,11 @@ info:
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_COUNT: "1"
GIT_CONFIG_GLOBAL: /dev/null
+ GIT_CONFIG_KEY_0: advice.mergeConflict
GIT_CONFIG_SYSTEM: /dev/null
+ GIT_CONFIG_VALUE_0: "false"
GIT_EDITOR: ""
LANG: C
LC_ALL: C
@@ -22,6 +25,6 @@ success: true
exit_code: 0
----- stdout -----
✅ Switched to worktree for feature-a at [REPO].feature-a
-💡 To enable automatic cd, run: wt config shell
+💡 To enable automatic cd, run: wt config shell install
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_previous_branch.snap b/tests/snapshots/integration__integration_tests__switch__switch_previous_branch.snap
index 4f71c0bf1..fb60f121d 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_previous_branch.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_previous_branch.snap
@@ -10,8 +10,11 @@ info:
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_COUNT: "1"
GIT_CONFIG_GLOBAL: /dev/null
+ GIT_CONFIG_KEY_0: advice.mergeConflict
GIT_CONFIG_SYSTEM: /dev/null
+ GIT_CONFIG_VALUE_0: "false"
GIT_EDITOR: ""
LANG: C
LC_ALL: C
@@ -22,6 +25,6 @@ success: true
exit_code: 0
----- stdout -----
✅ Switched to worktree for feature-a at [REPO].feature-a
-💡 To enable automatic cd, run: wt config shell
+💡 To enable automatic cd, run: wt config shell install
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_previous_branch_first.snap b/tests/snapshots/integration__integration_tests__switch__switch_previous_branch_first.snap
index 331f20ad0..72d710bf1 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_previous_branch_first.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_previous_branch_first.snap
@@ -10,8 +10,11 @@ info:
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_COUNT: "1"
GIT_CONFIG_GLOBAL: /dev/null
+ GIT_CONFIG_KEY_0: advice.mergeConflict
GIT_CONFIG_SYSTEM: /dev/null
+ GIT_CONFIG_VALUE_0: "false"
GIT_EDITOR: ""
LANG: C
LC_ALL: C
@@ -22,6 +25,6 @@ success: true
exit_code: 0
----- stdout -----
✅ Switched to worktree for feature-a at [REPO].feature-a
-💡 To enable automatic cd, run: wt config shell
+💡 To enable automatic cd, run: wt config shell install
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_previous_branch_second.snap b/tests/snapshots/integration__integration_tests__switch__switch_previous_branch_second.snap
index 5a9b92774..6d07b7c4c 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_previous_branch_second.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_previous_branch_second.snap
@@ -10,8 +10,11 @@ info:
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_COUNT: "1"
GIT_CONFIG_GLOBAL: /dev/null
+ GIT_CONFIG_KEY_0: advice.mergeConflict
GIT_CONFIG_SYSTEM: /dev/null
+ GIT_CONFIG_VALUE_0: "false"
GIT_EDITOR: ""
LANG: C
LC_ALL: C
@@ -22,6 +25,6 @@ success: true
exit_code: 0
----- stdout -----
✅ Switched to worktree for feature-b at [REPO].feature-b
-💡 To enable automatic cd, run: wt config shell
+💡 To enable automatic cd, run: wt config shell install
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_previous_branch_with_worktrunk_history_back.snap b/tests/snapshots/integration__integration_tests__switch__switch_previous_branch_with_worktrunk_history_back.snap
index 9d42caf5d..f16c83ead 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_previous_branch_with_worktrunk_history_back.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_previous_branch_with_worktrunk_history_back.snap
@@ -10,8 +10,11 @@ info:
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_COUNT: "1"
GIT_CONFIG_GLOBAL: /dev/null
+ GIT_CONFIG_KEY_0: advice.mergeConflict
GIT_CONFIG_SYSTEM: /dev/null
+ GIT_CONFIG_VALUE_0: "false"
GIT_EDITOR: ""
LANG: C
LC_ALL: C
@@ -22,6 +25,6 @@ success: true
exit_code: 0
----- stdout -----
✅ Switched to worktree for feature-x at [REPO].feature-x
-💡 To enable automatic cd, run: wt config shell
+💡 To enable automatic cd, run: wt config shell install
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_previous_branch_with_worktrunk_history_first.snap b/tests/snapshots/integration__integration_tests__switch__switch_previous_branch_with_worktrunk_history_first.snap
index 6d2afbb25..7ffdbf45e 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_previous_branch_with_worktrunk_history_first.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_previous_branch_with_worktrunk_history_first.snap
@@ -10,8 +10,11 @@ info:
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_COUNT: "1"
GIT_CONFIG_GLOBAL: /dev/null
+ GIT_CONFIG_KEY_0: advice.mergeConflict
GIT_CONFIG_SYSTEM: /dev/null
+ GIT_CONFIG_VALUE_0: "false"
GIT_EDITOR: ""
LANG: C
LC_ALL: C
@@ -22,6 +25,6 @@ success: true
exit_code: 0
----- stdout -----
✅ Switched to worktree for feature-x at [REPO].feature-x
-💡 To enable automatic cd, run: wt config shell
+💡 To enable automatic cd, run: wt config shell install
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_previous_branch_with_worktrunk_history_second.snap b/tests/snapshots/integration__integration_tests__switch__switch_previous_branch_with_worktrunk_history_second.snap
index 7b7e4b280..435074881 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_previous_branch_with_worktrunk_history_second.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_previous_branch_with_worktrunk_history_second.snap
@@ -10,8 +10,11 @@ info:
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_COUNT: "1"
GIT_CONFIG_GLOBAL: /dev/null
+ GIT_CONFIG_KEY_0: advice.mergeConflict
GIT_CONFIG_SYSTEM: /dev/null
+ GIT_CONFIG_VALUE_0: "false"
GIT_EDITOR: ""
LANG: C
LC_ALL: C
@@ -22,6 +25,6 @@ success: true
exit_code: 0
----- stdout -----
✅ Switched to worktree for feature-y at [REPO].feature-y
-💡 To enable automatic cd, run: wt config shell
+💡 To enable automatic cd, run: wt config shell install
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_primary_on_different_branch.snap b/tests/snapshots/integration__integration_tests__switch__switch_primary_on_different_branch.snap
index d3bd7d5c7..999087513 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_primary_on_different_branch.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_primary_on_different_branch.snap
@@ -11,8 +11,11 @@ info:
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_COUNT: "1"
GIT_CONFIG_GLOBAL: /dev/null
+ GIT_CONFIG_KEY_0: advice.mergeConflict
GIT_CONFIG_SYSTEM: /dev/null
+ GIT_CONFIG_VALUE_0: "false"
GIT_EDITOR: ""
LANG: C
LC_ALL: C
@@ -23,6 +26,6 @@ success: true
exit_code: 0
----- stdout -----
✅ Created new worktree for feature-from-main from main at [REPO].feature-from-main
-💡 To enable automatic cd, run: wt config shell
+💡 To enable automatic cd, run: wt config shell install
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_to_existing_primary_on_different_branch.snap b/tests/snapshots/integration__integration_tests__switch__switch_to_existing_primary_on_different_branch.snap
index 46041e5d5..eae8bb4ea 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_to_existing_primary_on_different_branch.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_to_existing_primary_on_different_branch.snap
@@ -10,8 +10,11 @@ info:
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_COUNT: "1"
GIT_CONFIG_GLOBAL: /dev/null
+ GIT_CONFIG_KEY_0: advice.mergeConflict
GIT_CONFIG_SYSTEM: /dev/null
+ GIT_CONFIG_VALUE_0: "false"
GIT_EDITOR: ""
LANG: C
LC_ALL: C
@@ -22,6 +25,6 @@ success: true
exit_code: 0
----- stdout -----
✅ Switched to worktree for existing-branch at [WORKTREE_EXISTING_BRANCH]
-💡 To enable automatic cd, run: wt config shell
+💡 To enable automatic cd, run: wt config shell install
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_with_base.snap b/tests/snapshots/integration__integration_tests__switch__switch_with_base.snap
index 82b082da8..92933b67c 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_with_base.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_with_base.snap
@@ -13,8 +13,11 @@ info:
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_COUNT: "1"
GIT_CONFIG_GLOBAL: /dev/null
+ GIT_CONFIG_KEY_0: advice.mergeConflict
GIT_CONFIG_SYSTEM: /dev/null
+ GIT_CONFIG_VALUE_0: "false"
GIT_EDITOR: ""
LANG: C
LC_ALL: C
@@ -25,6 +28,6 @@ success: true
exit_code: 0
----- stdout -----
✅ Created new worktree for feature-with-base from main at [REPO].feature-with-base
-💡 To enable automatic cd, run: wt config shell
+💡 To enable automatic cd, run: wt config shell install
----- stderr -----