Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
feat: Add user configuration for `wt list` and apply different help templates
Maximilian Roosd3d64abd8728
diff --git a/src/config/mod.rs b/src/config/mod.rsindex b30a0179b..0f647c9cd 100644--- a/src/config/mod.rs+++ b/src/config/mod.rs@@ -405,12 +405,15 @@ task2 = "echo 'Task 2 running' > task2.txt"fn test_user_project_config_equality() {let config1 = UserProjectConfig {approved_commands: vec!["npm install".to_string()],+ list: None,};let config2 = UserProjectConfig {approved_commands: vec!["npm install".to_string()],+ list: None,};let config3 = UserProjectConfig {approved_commands: vec!["npm test".to_string()],+ list: None,};assert_eq!(config1, config2);assert_ne!(config1, config3);@@ -423,6 +426,7 @@ task2 = "echo 'Task 2 running' > task2.txt""github.com/user/repo".to_string(),UserProjectConfig {approved_commands: vec!["npm install".to_string()],+ list: None,},);diff --git a/src/config/user.rs b/src/config/user.rsindex ca4bc6af1..7836ae197 100644--- a/src/config/user.rs+++ b/src/config/user.rs@@ -115,6 +115,10 @@ impl CommitGenerationConfig {/// ```toml/// [projects."github.com/user/repo"]/// approved-commands = ["npm install", "npm test"]+///+/// [projects."github.com/user/repo".list]+/// full = true+/// branches = false/// ```////// # Future Extensibility@@ -131,6 +135,22 @@ pub struct UserProjectConfig {skip_serializing_if = "Vec::is_empty")]pub approved_commands: Vec<String>,++ /// Configuration for the `wt list` command+ #[serde(default, skip_serializing_if = "Option::is_none")]+ pub list: Option<ListConfig>,+}++/// Configuration for the `wt list` command+#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]+pub struct ListConfig {+ /// Show CI, conflicts, and diffs by default+ #[serde(skip_serializing_if = "Option::is_none")]+ pub full: Option<bool>,++ /// Include branches without worktrees by default+ #[serde(skip_serializing_if = "Option::is_none")]+ pub branches: Option<bool>,}impl Default for WorktrunkConfig {diff --git a/src/main.rs b/src/main.rsindex be1023183..4253990a5 100644--- a/src/main.rs+++ b/src/main.rs@@ -272,14 +272,40 @@ fn main() {no_progressive,} => {use commands::list::progressive::RenderMode;- // Convert two bools to Option<bool>: Some(true), Some(false), or None- let progressive_opt = match (progressive, no_progressive) {- (true, _) => Some(true),- (_, true) => Some(false),- _ => None,- };- let render_mode = RenderMode::detect(progressive_opt, cli.internal);- handle_list(format, branches, full, render_mode)++ // Load config and merge with CLI flags (CLI flags take precedence)+ WorktrunkConfig::load()+ .git_context("Failed to load config")+ .and_then(|config| {+ let repo = Repository::current();++ // Get config values if we can determine the project ID+ // If we can't (e.g., early in initialization), use defaults+ let (show_branches_config, show_full_config) = repo+ .project_identifier()+ .ok()+ .and_then(|project_id| {+ config.projects.get(&project_id).and_then(|p| {+ p.list+ .as_ref()+ .map(|l| (l.branches.unwrap_or(false), l.full.unwrap_or(false)))+ })+ })+ .unwrap_or((false, false));++ // CLI flags override config+ let show_branches = branches || show_branches_config;+ let show_full = full || show_full_config;++ // Convert two bools to Option<bool>: Some(true), Some(false), or None+ let progressive_opt = match (progressive, no_progressive) {+ (true, _) => Some(true),+ (_, true) => Some(false),+ _ => None,+ };+ let render_mode = RenderMode::detect(progressive_opt, cli.internal);+ handle_list(format, show_branches, show_full, render_mode)+ })}Commands::Switch {branch,diff --git a/tests/common/mod.rs b/tests/common/mod.rsindex e9e5db7ab..e1d5e4e3f 100644--- a/tests/common/mod.rs+++ b/tests/common/mod.rs@@ -703,6 +703,28 @@ pub fn setup_snapshot_settings(repo: &TestRepo) -> insta::Settings {settings}+/// Create configured insta Settings for snapshot tests with a temporary home directory+///+/// This extends `setup_snapshot_settings` by adding a filter for the temporary home directory.+/// Use this for tests that need both a TestRepo and a temporary home (for user config testing).+pub fn setup_snapshot_settings_with_home(repo: &TestRepo, temp_home: &TempDir) -> insta::Settings {+ let mut settings = setup_snapshot_settings(repo);+ settings.add_filter(&temp_home.path().to_string_lossy(), "[TEMP_HOME]");+ settings+}++/// Create configured insta Settings for snapshot tests with only a temporary home directory+///+/// Use this for tests that don't need a TestRepo but do need a temporary home directory+/// (e.g., shell configuration tests, config init tests).+pub fn setup_home_snapshot_settings(temp_home: &TempDir) -> insta::Settings {+ let mut settings = insta::Settings::clone_current();+ settings.set_snapshot_path("../snapshots");+ settings.add_filter(&temp_home.path().to_string_lossy(), "[TEMP_HOME]");+ settings.add_filter(r"\\", "/");+ settings+}+/// Create a configured Command for snapshot testing////// This extracts the common command setup while allowing the test filediff --git a/tests/integration_tests/config_init.rs b/tests/integration_tests/config_init.rsindex 84f8f26cd..a7f5e5052 100644--- a/tests/integration_tests/config_init.rs+++ b/tests/integration_tests/config_init.rs@@ -1,5 +1,4 @@-use crate::common::{set_temp_home_env, wt_command};-use insta::Settings;+use crate::common::{set_temp_home_env, setup_home_snapshot_settings, wt_command};use insta_cmd::assert_cmd_snapshot;use std::fs;use tempfile::TempDir;@@ -19,13 +18,7 @@ fn test_config_init_already_exists() {).unwrap();- let mut settings = Settings::clone_current();- settings.set_snapshot_path("../snapshots");-- // Filter out the actual config paths- settings.add_filter(&temp_home.path().to_string_lossy(), "[TEMP_HOME]");- settings.add_filter(r"\\", "/");-+ let settings = setup_home_snapshot_settings(&temp_home);settings.bind(|| {let mut cmd = wt_command();cmd.arg("config").arg("init");@@ -53,13 +46,7 @@ fn test_config_init_creates_file() {let global_config_dir = temp_home.path().join(".config").join("worktrunk");fs::create_dir_all(&global_config_dir).unwrap();- let mut settings = Settings::clone_current();- settings.set_snapshot_path("../snapshots");-- // Filter out the actual config paths- settings.add_filter(&temp_home.path().to_string_lossy(), "[TEMP_HOME]");- settings.add_filter(r"\\", "/");-+ let settings = setup_home_snapshot_settings(&temp_home);settings.bind(|| {let mut cmd = wt_command();cmd.arg("config").arg("init");diff --git a/tests/integration_tests/config_list.rs b/tests/integration_tests/config_list.rsindex e6ccdc698..7e1044b69 100644--- a/tests/integration_tests/config_list.rs+++ b/tests/integration_tests/config_list.rs@@ -1,5 +1,7 @@-use crate::common::{TestRepo, set_temp_home_env, wt_command};-use insta::Settings;+use crate::common::{+ TestRepo, set_temp_home_env, setup_home_snapshot_settings, setup_snapshot_settings_with_home,+ wt_command,+};use insta_cmd::assert_cmd_snapshot;use std::fs;use tempfile::TempDir;@@ -37,15 +39,7 @@ server = "npm run dev").unwrap();- let mut settings = Settings::clone_current();- settings.set_snapshot_path("../snapshots");-- // Filter out the actual config paths to use placeholders- settings.add_filter(repo.root_path().to_str().unwrap(), "[REPO]");- settings.add_filter(&temp_home.path().to_string_lossy(), "[TEMP_HOME]");- // Normalize Windows paths to Unix style- settings.add_filter(r"\\", "/");-+ let settings = setup_snapshot_settings_with_home(&repo, &temp_home);settings.bind(|| {let mut cmd = wt_command();repo.clean_cli_env(&mut cmd);@@ -90,14 +84,7 @@ fn test_config_list_no_project_config() {).unwrap();- let mut settings = Settings::clone_current();- settings.set_snapshot_path("../snapshots");-- // Filter out the actual config paths to use placeholders- settings.add_filter(repo.root_path().to_str().unwrap(), "[REPO]");- settings.add_filter(&temp_home.path().to_string_lossy(), "[TEMP_HOME]");- settings.add_filter(r"\\", "/");-+ let settings = setup_snapshot_settings_with_home(&repo, &temp_home);settings.bind(|| {let mut cmd = wt_command();repo.clean_cli_env(&mut cmd);@@ -135,13 +122,7 @@ fn test_config_list_outside_git_repo() {).unwrap();- let mut settings = Settings::clone_current();- settings.set_snapshot_path("../snapshots");-- // Filter out the actual config paths- settings.add_filter(&temp_home.path().to_string_lossy(), "[TEMP_HOME]");- settings.add_filter(r"\\", "/");-+ let settings = setup_home_snapshot_settings(&temp_home);settings.bind(|| {let mut cmd = wt_command();cmd.arg("config").arg("list").current_dir(temp_dir.path());diff --git a/tests/integration_tests/configure_shell.rs b/tests/integration_tests/configure_shell.rsindex cf06fbea5..caca10842 100644--- a/tests/integration_tests/configure_shell.rs+++ b/tests/integration_tests/configure_shell.rs@@ -1,5 +1,4 @@-use crate::common::{TestRepo, set_temp_home_env, wt_command};-use insta::Settings;+use crate::common::{TestRepo, set_temp_home_env, setup_home_snapshot_settings, wt_command};use insta_cmd::assert_cmd_snapshot;use std::fs;use tempfile::TempDir;@@ -14,10 +13,7 @@ fn test_configure_shell_with_yes() {let zshrc_path = temp_home.path().join(".zshrc");fs::write(&zshrc_path, "# Existing config\n").unwrap();- let mut settings = Settings::clone_current();- settings.set_snapshot_path("../snapshots");- settings.add_filter(&temp_home.path().to_string_lossy(), "[TEMP_HOME]");-+ let settings = setup_home_snapshot_settings(&temp_home);settings.bind(|| {let mut cmd = wt_command();repo.clean_cli_env(&mut cmd);@@ -57,10 +53,7 @@ fn test_configure_shell_specific_shell() {let zshrc_path = temp_home.path().join(".zshrc");fs::write(&zshrc_path, "# Existing config\n").unwrap();- let mut settings = Settings::clone_current();- settings.set_snapshot_path("../snapshots");- settings.add_filter(&temp_home.path().to_string_lossy(), "[TEMP_HOME]");-+ let settings = setup_home_snapshot_settings(&temp_home);settings.bind(|| {let mut cmd = wt_command();repo.clean_cli_env(&mut cmd);@@ -106,10 +99,7 @@ fn test_configure_shell_already_exists() {).unwrap();- let mut settings = Settings::clone_current();- settings.set_snapshot_path("../snapshots");- settings.add_filter(&temp_home.path().to_string_lossy(), "[TEMP_HOME]");-+ let settings = setup_home_snapshot_settings(&temp_home);settings.bind(|| {let mut cmd = wt_command();repo.clean_cli_env(&mut cmd);@@ -143,10 +133,7 @@ fn test_configure_shell_fish() {let repo = TestRepo::new();let temp_home = TempDir::new().unwrap();- let mut settings = Settings::clone_current();- settings.set_snapshot_path("../snapshots");- settings.add_filter(&temp_home.path().to_string_lossy(), "[TEMP_HOME]");-+ let settings = setup_home_snapshot_settings(&temp_home);settings.bind(|| {let mut cmd = wt_command();repo.clean_cli_env(&mut cmd);@@ -191,9 +178,7 @@ fn test_configure_shell_no_files() {let repo = TestRepo::new();let temp_home = TempDir::new().unwrap();- let mut settings = Settings::clone_current();- settings.set_snapshot_path("../snapshots");- settings.add_filter(&temp_home.path().to_string_lossy(), "[TEMP_HOME]");+ let mut settings = setup_home_snapshot_settings(&temp_home);// Normalize bash config file names across platforms// Linux: ".bashrc, .bash_profile" → remove ".bashrc, "// macOS: ".bash_profile, .profile" → remove ", .profile"@@ -233,10 +218,7 @@ fn test_configure_shell_multiple_configs() {fs::write(&bash_config_path, "# Existing bash config\n").unwrap();fs::write(&zshrc_path, "# Existing zsh config\n").unwrap();- let mut settings = Settings::clone_current();- settings.set_snapshot_path("../snapshots");- settings.add_filter(&temp_home.path().to_string_lossy(), "[TEMP_HOME]");-+ let settings = setup_home_snapshot_settings(&temp_home);settings.bind(|| {let mut cmd = wt_command();repo.clean_cli_env(&mut cmd);@@ -295,10 +277,7 @@ fn test_configure_shell_mixed_states() {let zshrc_path = temp_home.path().join(".zshrc");fs::write(&zshrc_path, "# Existing zsh config\n").unwrap();- let mut settings = Settings::clone_current();- settings.set_snapshot_path("../snapshots");- settings.add_filter(&temp_home.path().to_string_lossy(), "[TEMP_HOME]");-+ let settings = setup_home_snapshot_settings(&temp_home);settings.bind(|| {let mut cmd = wt_command();repo.clean_cli_env(&mut cmd);diff --git a/tests/integration_tests/internal_flag.rs b/tests/integration_tests/internal_flag.rsindex 58a4375e5..faf61350e 100644--- a/tests/integration_tests/internal_flag.rs+++ b/tests/integration_tests/internal_flag.rs@@ -5,7 +5,7 @@//! 2. Commands that DON'T emit directives work correctly with --internal//! 3. The --internal flag can be safely passed to all commands-use crate::common::{TestRepo, set_temp_home_env, wt_command};+use crate::common::{TestRepo, set_temp_home_env, setup_snapshot_settings_with_home, wt_command};use insta::Settings;use insta_cmd::assert_cmd_snapshot;use std::fs;@@ -61,13 +61,7 @@ fn test_config_list_with_internal_flag() {).unwrap();- let mut settings = Settings::clone_current();- settings.set_snapshot_path("../snapshots");- // Filter out the actual config paths to use placeholders- settings.add_filter(repo.root_path().to_str().unwrap(), "[REPO]");- settings.add_filter(&temp_home.path().to_string_lossy(), "[TEMP_HOME]");- settings.add_filter(r"\\", "/");-+ let settings = setup_snapshot_settings_with_home(&repo, &temp_home);settings.bind(|| {let mut cmd = wt_command();repo.clean_cli_env(&mut cmd);diff --git a/tests/integration_tests/list_config.rs b/tests/integration_tests/list_config.rsnew file mode 100644index 000000000..988e21eda--- /dev/null+++ b/tests/integration_tests/list_config.rs@@ -0,0 +1,198 @@+//! Tests for `wt list` command with user config++use crate::common::{TestRepo, set_temp_home_env, setup_snapshot_settings_with_home, wt_command};+use insta_cmd::assert_cmd_snapshot;+use std::fs;+use tempfile::TempDir;++/// Test `wt list` with config setting full = true+#[test]+fn test_list_config_full_enabled() {+ let repo = TestRepo::new();+ repo.commit("Initial commit");+ let temp_home = TempDir::new().unwrap();++ // Create user config with list.full = true+ let global_config_dir = temp_home.path().join(".config").join("worktrunk");+ fs::create_dir_all(&global_config_dir).unwrap();+ fs::write(+ global_config_dir.join("config.toml"),+ r#"worktree-path = "../{{ main_worktree }}.{{ branch }}"++[projects."test-repo".list]+full = true+"#,+ )+ .unwrap();++ let settings = setup_snapshot_settings_with_home(&repo, &temp_home);+ settings.bind(|| {+ let mut cmd = wt_command();+ repo.clean_cli_env(&mut cmd);+ set_temp_home_env(&mut cmd, temp_home.path());+ cmd.arg("list").current_dir(repo.root_path());++ assert_cmd_snapshot!(cmd);+ });+}++/// Test `wt list` with config setting branches = true+#[test]+fn test_list_config_branches_enabled() {+ let repo = TestRepo::new();+ repo.commit("Initial commit");++ // Create a branch without a worktree+ let mut cmd = std::process::Command::new("git");+ repo.configure_git_cmd(&mut cmd);+ cmd.args(["branch", "feature"])+ .current_dir(repo.root_path())+ .output()+ .expect("Failed to create branch");++ let temp_home = TempDir::new().unwrap();++ // Create user config with list.branches = true+ let global_config_dir = temp_home.path().join(".config").join("worktrunk");+ fs::create_dir_all(&global_config_dir).unwrap();+ fs::write(+ global_config_dir.join("config.toml"),+ r#"worktree-path = "../{{ main_worktree }}.{{ branch }}"++[projects."test-repo".list]+branches = true+"#,+ )+ .unwrap();++ let settings = setup_snapshot_settings_with_home(&repo, &temp_home);+ settings.bind(|| {+ let mut cmd = wt_command();+ repo.clean_cli_env(&mut cmd);+ set_temp_home_env(&mut cmd, temp_home.path());+ cmd.arg("list").current_dir(repo.root_path());++ assert_cmd_snapshot!(cmd);+ });+}++/// Test that CLI flags override config settings+#[test]+fn test_list_config_cli_override() {+ let repo = TestRepo::new();+ repo.commit("Initial commit");++ // Create a branch without a worktree+ let mut cmd = std::process::Command::new("git");+ repo.configure_git_cmd(&mut cmd);+ cmd.args(["branch", "feature"])+ .current_dir(repo.root_path())+ .output()+ .expect("Failed to create branch");++ let temp_home = TempDir::new().unwrap();++ // Create user config with list.branches = false (default)+ let global_config_dir = temp_home.path().join(".config").join("worktrunk");+ fs::create_dir_all(&global_config_dir).unwrap();+ fs::write(+ global_config_dir.join("config.toml"),+ r#"worktree-path = "../{{ main_worktree }}.{{ branch }}"++[projects."test-repo".list]+branches = false+"#,+ )+ .unwrap();++ let settings = setup_snapshot_settings_with_home(&repo, &temp_home);+ settings.bind(|| {+ let mut cmd = wt_command();+ repo.clean_cli_env(&mut cmd);+ set_temp_home_env(&mut cmd, temp_home.path());+ // CLI flag --branches should override config+ cmd.arg("list")+ .arg("--branches")+ .current_dir(repo.root_path());++ assert_cmd_snapshot!(cmd);+ });+}++/// Test `wt list` with both full and branches config enabled+#[test]+fn test_list_config_full_and_branches() {+ let repo = TestRepo::new();+ repo.commit("Initial commit");++ // Create a branch without a worktree+ let mut cmd = std::process::Command::new("git");+ repo.configure_git_cmd(&mut cmd);+ cmd.args(["branch", "feature"])+ .current_dir(repo.root_path())+ .output()+ .expect("Failed to create branch");++ let temp_home = TempDir::new().unwrap();++ // Create user config with both full and branches enabled+ let global_config_dir = temp_home.path().join(".config").join("worktrunk");+ fs::create_dir_all(&global_config_dir).unwrap();+ fs::write(+ global_config_dir.join("config.toml"),+ r#"worktree-path = "../{{ main_worktree }}.{{ branch }}"++[projects."test-repo".list]+full = true+branches = true+"#,+ )+ .unwrap();++ let settings = setup_snapshot_settings_with_home(&repo, &temp_home);+ settings.bind(|| {+ let mut cmd = wt_command();+ repo.clean_cli_env(&mut cmd);+ set_temp_home_env(&mut cmd, temp_home.path());+ cmd.arg("list").current_dir(repo.root_path());++ assert_cmd_snapshot!(cmd);+ });+}++/// Test `wt list` without config (default behavior)+#[test]+fn test_list_no_config() {+ let repo = TestRepo::new();+ repo.commit("Initial commit");++ // Create a branch without a worktree+ let mut cmd = std::process::Command::new("git");+ repo.configure_git_cmd(&mut cmd);+ cmd.args(["branch", "feature"])+ .current_dir(repo.root_path())+ .output()+ .expect("Failed to create branch");++ let temp_home = TempDir::new().unwrap();++ // Create minimal user config without list settings+ let global_config_dir = temp_home.path().join(".config").join("worktrunk");+ fs::create_dir_all(&global_config_dir).unwrap();+ fs::write(+ global_config_dir.join("config.toml"),+ r#"worktree-path = "../{{ main_worktree }}.{{ branch }}"+"#,+ )+ .unwrap();++ let settings = setup_snapshot_settings_with_home(&repo, &temp_home);+ settings.bind(|| {+ let mut cmd = wt_command();+ repo.clean_cli_env(&mut cmd);+ set_temp_home_env(&mut cmd, temp_home.path());+ cmd.arg("list").current_dir(repo.root_path());++ assert_cmd_snapshot!(cmd);+ });+}diff --git a/tests/integration_tests/mod.rs b/tests/integration_tests/mod.rsindex b63953792..4c25dd6b5 100644--- a/tests/integration_tests/mod.rs+++ b/tests/integration_tests/mod.rs@@ -24,6 +24,7 @@ pub mod init;pub mod internal_flag;pub mod list;pub mod list_column_alignment;+pub mod list_config;pub mod list_progressive;pub mod list_pty;pub mod merge;diff --git a/tests/snapshots/integration__integration_tests__list_config__list_config_branches_enabled.snap b/tests/snapshots/integration__integration_tests__list_config__list_config_branches_enabled.snapnew file mode 100644index 000000000..a950a65d2--- /dev/null+++ b/tests/snapshots/integration__integration_tests__list_config__list_config_branches_enabled.snap@@ -0,0 +1,33 @@+---+source: tests/integration_tests/list_config.rs+info:+ program: wt+ args:+ - list+ env:+ CLICOLOR_FORCE: "1"+ 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: ""+ HOME: "[TEST_HOME]"+ LANG: C+ LC_ALL: C+ SOURCE_DATE_EPOCH: "1761609600"+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"+---+success: true+exit_code: 0+----- stdout -----++----- stderr -----+[1mBranch[0m [1mStatus[0m [1mHEAD±[0m [1mmain↕[0m [1mPath[0m [1mRemote⇅[0m [1mCommit[0m [1mAge[0m [1mMessage[0m+[1m[35mmain[0m [1m[35m.[0m [SHA] [2m10 months ago[0m [2mInitial commit[0m++⚪ [2mShowing 1 worktree[0mdiff --git a/tests/snapshots/integration__integration_tests__list_config__list_config_cli_override.snap b/tests/snapshots/integration__integration_tests__list_config__list_config_cli_override.snapnew file mode 100644index 000000000..3bf6faa9b--- /dev/null+++ b/tests/snapshots/integration__integration_tests__list_config__list_config_cli_override.snap@@ -0,0 +1,35 @@+---+source: tests/integration_tests/list_config.rs+info:+ program: wt+ args:+ - list+ - "--branches"+ env:+ CLICOLOR_FORCE: "1"+ 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: ""+ HOME: "[TEST_HOME]"+ LANG: C+ LC_ALL: C+ SOURCE_DATE_EPOCH: "1761609600"+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"+---+success: true+exit_code: 0+----- stdout -----++----- stderr -----+[1mBranch[0m [1mStatus[0m [1mHEAD±[0m [1mmain↕[0m [1mPath[0m [1mRemote⇅[0m [1mCommit[0m [1mAge[0m [1mMessage[0m+[1m[35mmain[0m [1m[35m.[0m [SHA] [2m10 months ago[0m [2mInitial commit[0m+[2mfeature[0m [2m∅[0m [2m⎇[0m [SHA] [2m10 months ago[0m [2mInitial commit[0m++⚪ [2mShowing 1 worktrees, 1 branches[0mdiff --git a/tests/snapshots/integration__integration_tests__list_config__list_config_full_and_branches.snap b/tests/snapshots/integration__integration_tests__list_config__list_config_full_and_branches.snapnew file mode 100644index 000000000..a950a65d2--- /dev/null+++ b/tests/snapshots/integration__integration_tests__list_config__list_config_full_and_branches.snap@@ -0,0 +1,33 @@+---+source: tests/integration_tests/list_config.rs+info:+ program: wt+ args:+ - list+ env:+ CLICOLOR_FORCE: "1"+ 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: ""+ HOME: "[TEST_HOME]"+ LANG: C+ LC_ALL: C+ SOURCE_DATE_EPOCH: "1761609600"+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"+---+success: true+exit_code: 0+----- stdout -----++----- stderr -----+[1mBranch[0m [1mStatus[0m [1mHEAD±[0m [1mmain↕[0m [1mPath[0m [1mRemote⇅[0m [1mCommit[0m [1mAge[0m [1mMessage[0m+[1m[35mmain[0m [1m[35m.[0m [SHA] [2m10 months ago[0m [2mInitial commit[0m++⚪ [2mShowing 1 worktree[0mdiff --git a/tests/snapshots/integration__integration_tests__list_config__list_config_full_enabled.snap b/tests/snapshots/integration__integration_tests__list_config__list_config_full_enabled.snapnew file mode 100644index 000000000..a950a65d2--- /dev/null+++ b/tests/snapshots/integration__integration_tests__list_config__list_config_full_enabled.snap@@ -0,0 +1,33 @@+---+source: tests/integration_tests/list_config.rs+info:+ program: wt+ args:+ - list+ env:+ CLICOLOR_FORCE: "1"+ 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: ""+ HOME: "[TEST_HOME]"+ LANG: C+ LC_ALL: C+ SOURCE_DATE_EPOCH: "1761609600"+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"+---+success: true+exit_code: 0+----- stdout -----++----- stderr -----+[1mBranch[0m [1mStatus[0m [1mHEAD±[0m [1mmain↕[0m [1mPath[0m [1mRemote⇅[0m [1mCommit[0m [1mAge[0m [1mMessage[0m+[1m[35mmain[0m [1m[35m.[0m [SHA] [2m10 months ago[0m [2mInitial commit[0m++⚪ [2mShowing 1 worktree[0mdiff --git a/tests/snapshots/integration__integration_tests__list_config__list_no_config.snap b/tests/snapshots/integration__integration_tests__list_config__list_no_config.snapnew file mode 100644index 000000000..a950a65d2--- /dev/null+++ b/tests/snapshots/integration__integration_tests__list_config__list_no_config.snap@@ -0,0 +1,33 @@+---+source: tests/integration_tests/list_config.rs+info:+ program: wt+ args:+ - list+ env:+ CLICOLOR_FORCE: "1"+ 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: ""+ HOME: "[TEST_HOME]"+ LANG: C+ LC_ALL: C+ SOURCE_DATE_EPOCH: "1761609600"+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"+---+success: true+exit_code: 0+----- stdout -----++----- stderr -----+[1mBranch[0m [1mStatus[0m [1mHEAD±[0m [1mmain↕[0m [1mPath[0m [1mRemote⇅[0m [1mCommit[0m [1mAge[0m [1mMessage[0m+[1m[35mmain[0m [1m[35m.[0m [SHA] [2m10 months ago[0m [2mInitial commit[0m++⚪ [2mShowing 1 worktree[0m