Skip to content

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

feat: Page `config show` output and redirect to stderr

Maximilian Roosd227d90ce214
diff --git a/src/commands/config.rs b/src/commands/config.rs
index 94545b5a3..2ffe63069 100644
--- a/src/commands/config.rs
+++ b/src/commands/config.rs
@@ -1,12 +1,17 @@
use anyhow::Context;
use etcetera::base_strategy::{BaseStrategy, choose_base_strategy};
+use std::fmt::Write as _;
use std::path::PathBuf;
use worktrunk::git::Repository;
use worktrunk::path::format_path_for_display;
use worktrunk::shell::Shell;
-use worktrunk::styling::{AnstyleStyle, CYAN, GREEN, GREEN_BOLD, format_toml};
+use worktrunk::styling::{
+ AnstyleStyle, CYAN, GREEN, GREEN_BOLD, HINT, HINT_EMOJI, INFO_EMOJI, WARNING, WARNING_EMOJI,
+ format_toml, format_with_gutter,
+};
use super::configure_shell::{ConfigAction, scan_shell_configs};
+use crate::help_pager::show_help_in_pager;
use crate::output;
/// Example configuration file content (displayed in help with values uncommented)
@@ -77,40 +82,54 @@ pub fn handle_config_create() -> anyhow::Result<()> {
/// Handle the config show command
pub fn handle_config_show() -> anyhow::Result<()> {
- // Display global config
- display_global_config()?;
- output::blank()?;
+ // Build the complete output as a string
+ let mut output = String::new();
- // Display project config if in a git repository
- display_project_config()?;
- output::blank()?;
+ // Render global config
+ render_global_config(&mut output)?;
+ output.push('\n');
+
+ // Render project config if in a git repository
+ render_project_config(&mut output)?;
+ output.push('\n');
- // Display shell integration status
- display_shell_status()?;
+ // Render shell integration status
+ render_shell_status(&mut output)?;
+
+ // Display through pager
+ if let Err(e) = show_help_in_pager(&output) {
+ log::debug!("Pager invocation failed: {}", e);
+ // Fall back to direct output via eprintln (matches help behavior)
+ worktrunk::styling::eprintln!("{}", output);
+ }
Ok(())
}
-fn display_global_config() -> anyhow::Result<()> {
+fn render_global_config(out: &mut String) -> anyhow::Result<()> {
let bold = AnstyleStyle::new().bold();
// Get config path
let config_path = get_global_config_path()
.ok_or_else(|| anyhow::anyhow!("Could not determine global config path"))?;
- output::info(format!(
- "Global Config: {bold}{}{bold:#}",
+ writeln!(
+ out,
+ "{INFO_EMOJI} Global Config: {bold}{}{bold:#}",
format_path_for_display(&config_path)
- ))?;
+ )?;
// Check if file exists
if !config_path.exists() {
- output::hint("Not found (using defaults)")?;
- output::hint("Run 'wt config create' to create a config file")?;
- output::blank()?;
+ writeln!(out, "{HINT_EMOJI} {HINT}Not found (using defaults){HINT:#}")?;
+ writeln!(
+ out,
+ "{HINT_EMOJI} {HINT}Run 'wt config create' to create a config file{HINT:#}"
+ )?;
+ writeln!(out)?;
let default_config =
"# Default configuration:\nworktree-path = \"../{{ main_worktree }}.{{ branch }}\"";
- output::gutter(format_toml(default_config, ""))?;
+ write!(out, "{}", format_toml(default_config, ""))?;
return Ok(());
}
@@ -118,17 +137,20 @@ fn display_global_config() -> anyhow::Result<()> {
let contents = std::fs::read_to_string(&config_path).context("Failed to read config file")?;
if contents.trim().is_empty() {
- output::hint("Empty file (using defaults)")?;
+ writeln!(
+ out,
+ "{HINT_EMOJI} {HINT}Empty file (using defaults){HINT:#}"
+ )?;
return Ok(());
}
// Display TOML with syntax highlighting (gutter at column 0)
- output::gutter(format_toml(&contents, ""))?;
+ write!(out, "{}", format_toml(&contents, ""))?;
Ok(())
}
-fn display_project_config() -> anyhow::Result<()> {
+fn render_project_config(out: &mut String) -> anyhow::Result<()> {
let bold = AnstyleStyle::new().bold();
let dim = AnstyleStyle::new().dimmed();
@@ -137,22 +159,24 @@ fn display_project_config() -> anyhow::Result<()> {
let repo_root = match repo.worktree_root() {
Ok(root) => root,
Err(_) => {
- output::info(format!(
- "{dim}Project Config: Not in a git repository{dim:#}"
- ))?;
+ writeln!(
+ out,
+ "{INFO_EMOJI} {dim}Project Config: Not in a git repository{dim:#}"
+ )?;
return Ok(());
}
};
let config_path = repo_root.join(".config").join("wt.toml");
- output::info(format!(
- "Project Config: {bold}{}{bold:#}",
+ writeln!(
+ out,
+ "{INFO_EMOJI} Project Config: {bold}{}{bold:#}",
format_path_for_display(&config_path)
- ))?;
+ )?;
// Check if file exists
if !config_path.exists() {
- output::hint("Not found")?;
+ writeln!(out, "{HINT_EMOJI} {HINT}Not found{HINT:#}")?;
return Ok(());
}
@@ -160,19 +184,17 @@ fn display_project_config() -> anyhow::Result<()> {
let contents = std::fs::read_to_string(&config_path).context("Failed to read config file")?;
if contents.trim().is_empty() {
- output::hint("Empty file")?;
+ writeln!(out, "{HINT_EMOJI} {HINT}Empty file{HINT:#}")?;
return Ok(());
}
// Display TOML with syntax highlighting (gutter at column 0)
- output::gutter(format_toml(&contents, ""))?;
+ write!(out, "{}", format_toml(&contents, ""))?;
Ok(())
}
-fn display_shell_status() -> anyhow::Result<()> {
- use worktrunk::styling::{WARNING, format_with_gutter};
-
+fn render_shell_status(out: &mut String) -> anyhow::Result<()> {
let bold = AnstyleStyle::new().bold();
let dim = AnstyleStyle::new().dimmed();
@@ -180,7 +202,10 @@ fn display_shell_status() -> anyhow::Result<()> {
let scan_result = match scan_shell_configs(None, true) {
Ok(r) => r,
Err(e) => {
- output::hint(format!("Could not determine shell status: {e}"))?;
+ writeln!(
+ out,
+ "{HINT_EMOJI} {HINT}Could not determine shell status: {e}{HINT:#}"
+ )?;
return Ok(());
}
};
@@ -204,20 +229,22 @@ fn display_shell_status() -> anyhow::Result<()> {
match result.action {
ConfigAction::AlreadyExists => {
any_configured = true;
- output::info(format!(
- "Already configured {what} for {bold}{shell}{bold:#} @ {path}"
- ))?;
+ writeln!(
+ out,
+ "{INFO_EMOJI} Already configured {what} for {bold}{shell}{bold:#} @ {path}"
+ )?;
// Check if zsh has compinit enabled (required for completions)
if matches!(shell, Shell::Zsh) && check_zsh_compinit_missing() {
- output::warning(format!(
- "{WARNING}Completions won't work; add to ~/.zshrc before the wt line:{WARNING:#}"
- ))?;
- output::gutter(format_with_gutter(
- "autoload -Uz compinit && compinit",
- "",
- None,
- ))?;
+ writeln!(
+ out,
+ "{WARNING_EMOJI} {WARNING}Completions won't work; add to ~/.zshrc before the wt line:{WARNING:#}"
+ )?;
+ write!(
+ out,
+ "{}",
+ format_with_gutter("autoload -Uz compinit && compinit", "", None,)
+ )?;
}
// For fish, check completions file separately
@@ -226,22 +253,25 @@ fn display_shell_status() -> anyhow::Result<()> {
{
let completion_display = format_path_for_display(&completion_path);
if completion_path.exists() {
- output::info(format!(
- "Already configured completions for {bold}{shell}{bold:#} @ {completion_display}"
- ))?;
+ writeln!(
+ out,
+ "{INFO_EMOJI} Already configured completions for {bold}{shell}{bold:#} @ {completion_display}"
+ )?;
} else {
any_not_configured = true;
- output::hint(format!(
- "Not configured completions for {bold}{shell}{bold:#} @ {completion_display}"
- ))?;
+ writeln!(
+ out,
+ "{HINT_EMOJI} {HINT}Not configured completions for {bold}{shell}{bold:#} @ {completion_display}{HINT:#}"
+ )?;
}
}
}
ConfigAction::WouldAdd | ConfigAction::WouldCreate => {
any_not_configured = true;
- output::hint(format!(
- "Not configured {what} for {bold}{shell}{bold:#} @ {path}"
- ))?;
+ writeln!(
+ out,
+ "{HINT_EMOJI} {HINT}Not configured {what} for {bold}{shell}{bold:#} @ {path}{HINT:#}"
+ )?;
}
_ => {} // Added/Created won't appear in dry_run mode
}
@@ -250,13 +280,16 @@ fn display_shell_status() -> anyhow::Result<()> {
// Show skipped (not installed) shells
for (shell, path) in &scan_result.skipped {
let path = format_path_for_display(path);
- output::raw(format!("{dim}⚪ Skipped {shell}; {path} not found{dim:#}"))?;
+ writeln!(out, "{dim}⚪ Skipped {shell}; {path} not found{dim:#}")?;
}
// Summary hint
if any_not_configured && !any_configured {
- output::blank()?;
- output::hint("Run 'wt config shell install' to enable shell integration")?;
+ writeln!(out)?;
+ writeln!(
+ out,
+ "{HINT_EMOJI} {HINT}Run 'wt config shell install' to enable shell integration{HINT:#}"
+ )?;
}
Ok(())
diff --git a/src/help_pager.rs b/src/help_pager.rs
index 3cb1ba596..ae60e1b58 100644
--- a/src/help_pager.rs
+++ b/src/help_pager.rs
@@ -55,13 +55,17 @@ fn detect_help_pager() -> Option<String> {
/// Show help text through a pager with TTY access for interactive scrolling.
///
/// Only uses pager when stdout is a terminal. Falls back to direct output if:
-/// - No pager configured (prints directly)
-/// - stdout is not a TTY (prints directly)
+/// - No pager configured (prints to stderr)
+/// - stdout is not a TTY (prints to stderr)
/// - Pager spawn fails (returns error)
+///
+/// Note: All fallbacks output to stderr for consistency with pager behavior
+/// (which sends output to stderr via `>&2`). This ensures `config show --internal`
+/// works correctly in directive mode where stdout is reserved for shell directives.
pub fn show_help_in_pager(help_text: &str) -> std::io::Result<()> {
let Some(pager_cmd) = detect_help_pager() else {
- log::debug!("No pager configured, printing help directly");
- print!("{}", help_text);
+ log::debug!("No pager configured, printing help directly to stderr");
+ eprint!("{}", help_text);
return Ok(());
};
@@ -72,7 +76,7 @@ pub fn show_help_in_pager(help_text: &str) -> std::io::Result<()> {
if !is_tty {
log::debug!("Neither stdout nor stderr is a TTY, skipping pager");
- print!("{}", help_text);
+ eprint!("{}", help_text);
return Ok(());
}
diff --git a/src/main.rs b/src/main.rs
index 82964d96e..73bea93b9 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -11,7 +11,7 @@ mod cli;
mod commands;
mod completion;
mod display;
-mod help_pager;
+pub(crate) mod help_pager;
mod help_resolver;
mod llm;
mod md_help;
diff --git a/tests/integration_tests/config_show.rs b/tests/integration_tests/config_show.rs
index f2f056f72..4fdc6776b 100644
--- a/tests/integration_tests/config_show.rs
+++ b/tests/integration_tests/config_show.rs
@@ -50,6 +50,8 @@ server = "npm run dev"
success: true
exit_code: 0
----- stdout -----
+
+ ----- stderr -----
⚪ Global Config: ~/.config/worktrunk/config.toml
  worktree-path = "../{{ main_worktree }}.{{ branch }}"
 
@@ -66,8 +68,6 @@ server = "npm run dev"
⚪ Skipped bash; ~/.bashrc not found
⚪ Skipped zsh; ~/.zshrc not found
⚪ Skipped fish; ~/.config/fish/conf.d not found
-
- ----- stderr -----
"#);
});
}
@@ -99,6 +99,8 @@ fn test_config_show_no_project_config() {
success: true
exit_code: 0
----- stdout -----
+
+ ----- stderr -----
⚪ Global Config: ~/.config/worktrunk/config.toml
  worktree-path = "../{{ main_worktree }}.{{ branch }}"
@@ -108,8 +110,6 @@ fn test_config_show_no_project_config() {
⚪ Skipped bash; ~/.bashrc not found
⚪ Skipped zsh; ~/.zshrc not found
⚪ Skipped fish; ~/.config/fish/conf.d not found
-
- ----- stderr -----
"#);
});
}
@@ -140,6 +140,8 @@ fn test_config_show_outside_git_repo() {
success: true
exit_code: 0
----- stdout -----
+
+ ----- stderr -----
⚪ Global Config: ~/.config/worktrunk/config.toml
  worktree-path = "../{{ main_worktree }}.{{ branch }}"
@@ -148,8 +150,6 @@ fn test_config_show_outside_git_repo() {
⚪ Skipped bash; ~/.bashrc not found
⚪ Skipped zsh; ~/.zshrc not found
⚪ Skipped fish; ~/.config/fish/conf.d not found
-
- ----- stderr -----
"#);
});
}
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_zsh_compinit_correct_order.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_zsh_compinit_correct_order.snap
index 14af70890..644dced39 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_zsh_compinit_correct_order.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_zsh_compinit_correct_order.snap
@@ -17,12 +17,16 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
+ WORKTRUNK_BIN: ""
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WT_ASSUME_COMPINIT: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: true
exit_code: 0
----- stdout -----
+
+----- stderr -----
⚪ Global Config: ~/.config/worktrunk/config.toml
💡 Empty file (using defaults)
@@ -32,5 +36,3 @@ exit_code: 0
⚪ Already configured shell extension & completions for zsh @ ~/.zshrc
⚪ Skipped bash; ~/.bashrc not found
⚪ Skipped fish; ~/.config/fish/conf.d not found
-
------ stderr -----
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_zsh_compinit_warning.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_zsh_compinit_warning.snap
index a524802d0..56e0206c0 100644
--- a/tests/snapshots/integration__integration_tests__config_show__config_show_zsh_compinit_warning.snap
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_zsh_compinit_warning.snap
@@ -17,12 +17,15 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
+ WORKTRUNK_BIN: ""
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
success: true
exit_code: 0
----- stdout -----
+
+----- stderr -----
⚪ Global Config: ~/.config/worktrunk/config.toml
💡 Empty file (using defaults)
@@ -34,5 +37,3 @@ exit_code: 0
  autoload -Uz compinit && compinit
⚪ Skipped bash; ~/.bashrc not found
⚪ Skipped fish; ~/.config/fish/conf.d not found
-
------ stderr -----
diff --git a/tests/snapshots/integration__integration_tests__help__help_beta.snap b/tests/snapshots/integration__integration_tests__help__help_beta.snap
index fe22b1214..101b582b0 100644
--- a/tests/snapshots/integration__integration_tests__help__help_beta.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_beta.snap
@@ -9,11 +9,14 @@ info:
CLICOLOR_FORCE: "1"
COLUMNS: "150"
GIT_EDITOR: ""
+ WORKTRUNK_BIN: ""
WORKTRUNK_CONFIG_PATH: /nonexistent/test/config.toml
---
success: true
exit_code: 0
----- stdout -----
+
+----- stderr -----
wt beta - Experimental commands
Usage: wt beta [OPTIONS] <COMMAND>
@@ -34,5 +37,3 @@ Global Options:
-v, --verbose
Show commands and debug info
-
------ stderr -----
diff --git a/tests/snapshots/integration__integration_tests__help__help_config.snap b/tests/snapshots/integration__integration_tests__help__help_config.snap
index 854b8d2b0..c81dea975 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config.snap
@@ -9,11 +9,14 @@ info:
CLICOLOR_FORCE: "1"
COLUMNS: "150"
GIT_EDITOR: ""
+ WORKTRUNK_BIN: ""
WORKTRUNK_CONFIG_PATH: /nonexistent/test/config.toml
---
success: true
exit_code: 0
----- stdout -----
+
+----- stderr -----
wt config - Manage configuration and shell integration
Usage: wt config [OPTIONS] <COMMAND>
@@ -90,5 +93,3 @@ Docs: <https://llm.datasette.io/> | <https://github.com/sigoden/aichat>
- Location: .config/wt.toml in repository root
- Contains: post-create, post-start, pre-commit, pre-merge, post-merge hooks
-
------ stderr -----
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_approvals.snap b/tests/snapshots/integration__integration_tests__help__help_config_approvals.snap
index 063473139..e2c010d41 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_approvals.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_approvals.snap
@@ -10,11 +10,14 @@ info:
CLICOLOR_FORCE: "1"
COLUMNS: "150"
GIT_EDITOR: ""
+ WORKTRUNK_BIN: ""
WORKTRUNK_CONFIG_PATH: /nonexistent/test/config.toml
---
success: true
exit_code: 0
----- stdout -----
+
+----- stderr -----
wt config approvals - Manage command approvals
Usage: wt config approvals [OPTIONS] <COMMAND>
@@ -65,5 +68,3 @@ Clear approvals for current project:
Clear global approvals:
wt config approvals clear --global
-
------ stderr -----
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_approvals_add.snap b/tests/snapshots/integration__integration_tests__help__help_config_approvals_add.snap
index e474030f7..9f6cfb89e 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_approvals_add.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_approvals_add.snap
@@ -11,11 +11,14 @@ info:
CLICOLOR_FORCE: "1"
COLUMNS: "150"
GIT_EDITOR: ""
+ WORKTRUNK_BIN: ""
WORKTRUNK_CONFIG_PATH: /nonexistent/test/config.toml
---
success: true
exit_code: 0
----- stdout -----
+
+----- stderr -----
wt config approvals add - Store approvals in config
Usage: wt config approvals add [OPTIONS]
@@ -43,5 +46,3 @@ Prompts for approval of all project commands and saves them to user config.
By default, shows only unapproved commands. Use --all to review all commands
including previously approved ones. Use --force to approve without prompts.
-
------ stderr -----
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_approvals_clear.snap b/tests/snapshots/integration__integration_tests__help__help_config_approvals_clear.snap
index e2a7a08c6..995076f41 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_approvals_clear.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_approvals_clear.snap
@@ -11,11 +11,14 @@ info:
CLICOLOR_FORCE: "1"
COLUMNS: "150"
GIT_EDITOR: ""
+ WORKTRUNK_BIN: ""
WORKTRUNK_CONFIG_PATH: /nonexistent/test/config.toml
---
success: true
exit_code: 0
----- stdout -----
+
+----- stderr -----
wt config approvals clear - Clear approved commands from config
Usage: wt config approvals clear [OPTIONS]
@@ -40,5 +43,3 @@ Removes saved approvals, requiring re-approval on next command run.
By default, clears approvals for the current project. Use --global to clear
all approvals across all projects.
-
------ stderr -----
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_create.snap b/tests/snapshots/integration__integration_tests__help__help_config_create.snap
index 23e461a62..969729556 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_create.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_create.snap
@@ -10,11 +10,14 @@ info:
CLICOLOR_FORCE: "1"
COLUMNS: "150"
GIT_EDITOR: ""
+ WORKTRUNK_BIN: ""
WORKTRUNK_CONFIG_PATH: /nonexistent/test/config.toml
---
success: true
exit_code: 0
----- stdout -----
+
+----- stderr -----
wt config create - Create global configuration file
Usage: wt config create [OPTIONS]
@@ -211,5 +214,3 @@ Creates ~/.config/worktrunk/config.toml with the following content:
# Generate one cohesive commit message that captures the overall change.
# Use conventional commit format (feat/fix/docs/refactor).
# """
-
------ stderr -----
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_refresh_cache.snap b/tests/snapshots/integration__integration_tests__help__help_config_refresh_cache.snap
index 2fa647e79..2dd3459ac 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_refresh_cache.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_refresh_cache.snap
@@ -10,11 +10,14 @@ info:
CLICOLOR_FORCE: "1"
COLUMNS: "150"
GIT_EDITOR: ""
+ WORKTRUNK_BIN: ""
WORKTRUNK_CONFIG_PATH: /nonexistent/test/config.toml
---
success: true
exit_code: 0
----- stdout -----
+
+----- stderr -----
wt config refresh-cache - Refresh default branch from remote
Usage: wt config refresh-cache [OPTIONS]
@@ -36,5 +39,3 @@ Queries the remote to determine the default branch and caches the result.
Use when the remote default branch has changed. The cached value is used by
wt merge, wt list, and other commands that reference the default branch.
-
------ stderr -----
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_shell.snap b/tests/snapshots/integration__integration_tests__help__help_config_shell.snap
index cf79514de..3bd20c1ae 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_shell.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_shell.snap
@@ -10,11 +10,14 @@ info:
CLICOLOR_FORCE: "1"
COLUMNS: "150"
GIT_EDITOR: ""
+ WORKTRUNK_BIN: ""
WORKTRUNK_CONFIG_PATH: /nonexistent/test/config.toml
---
success: true
exit_code: 0
----- stdout -----
+
+----- stderr -----
wt config shell - Shell integration setup
Usage: wt config shell [OPTIONS] <COMMAND>
@@ -36,5 +39,3 @@ Global Options:
-v, --verbose
Show commands and debug info
-
------ stderr -----
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_show.snap b/tests/snapshots/integration__integration_tests__help__help_config_show.snap
index 6023e25f1..dcb9cf107 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_show.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_show.snap
@@ -10,11 +10,14 @@ info:
CLICOLOR_FORCE: "1"
COLUMNS: "150"
GIT_EDITOR: ""
+ WORKTRUNK_BIN: ""
WORKTRUNK_CONFIG_PATH: /nonexistent/test/config.toml
---
success: true
exit_code: 0
----- stdout -----
+
+----- stderr -----
wt config show - Show configuration files & locations
Usage: wt config show [OPTIONS]
@@ -36,5 +39,3 @@ Shows location and contents of global config (~/.config/worktrunk/config.tom
and project config (.config/wt.toml).
If a config file doesn't exist, shows defaults that would be used.
-
------ stderr -----
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_status_set.snap b/tests/snapshots/integration__integration_tests__help__help_config_status_set.snap
index 87a74b21f..69612ad64 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_status_set.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_status_set.snap
@@ -11,11 +11,14 @@ info:
CLICOLOR_FORCE: "1"
COLUMNS: "150"
GIT_EDITOR: ""
+ WORKTRUNK_BIN: ""
WORKTRUNK_CONFIG_PATH: /nonexistent/test/config.toml
---
success: true
exit_code: 0
----- stdout -----
+
+----- stderr -----
wt config status set - Set status emoji for branch
Usage: wt config status set [OPTIONS] <VALUE>
@@ -44,5 +47,3 @@ Sets a custom status marker that appears in wt list output.
Use emojis or short text to indicate work state (e.g., 🚧 WIP, ✅ ready, 🔒 blocked).
Stored in git config under worktrunk.status.<branch>.
-
------ stderr -----
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_status_unset.snap b/tests/snapshots/integration__integration_tests__help__help_config_status_unset.snap
index 5790b3497..984e46371 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_status_unset.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_status_unset.snap
@@ -11,11 +11,14 @@ info:
CLICOLOR_FORCE: "1"
COLUMNS: "150"
GIT_EDITOR: ""
+ WORKTRUNK_BIN: ""
WORKTRUNK_CONFIG_PATH: /nonexistent/test/config.toml
---
success: true
exit_code: 0
----- stdout -----
+
+----- stderr -----
wt config status unset - Clear status emoji
Usage: wt config status unset [OPTIONS] [TARGET]
@@ -40,5 +43,3 @@ Global Options:
Show commands and debug info
Removes status marker from branch(es). Use * to clear all statuses.
-
------ stderr -----
diff --git a/tests/snapshots/integration__integration_tests__help__help_list.snap b/tests/snapshots/integration__integration_tests__help__help_list.snap
index 6b806e692..4aa8dc995 100644
--- a/tests/snapshots/integration__integration_tests__help__help_list.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_list.snap
@@ -9,11 +9,14 @@ info:
CLICOLOR_FORCE: "1"
COLUMNS: "150"
GIT_EDITOR: ""
+ WORKTRUNK_BIN: ""
WORKTRUNK_CONFIG_PATH: /nonexistent/test/config.toml
---
success: true
exit_code: 0
----- stdout -----
+
+----- stderr -----
wt list - List worktrees and optionally branches
Usage: wt list [OPTIONS]
@@ -141,5 +144,3 @@ Note: locked and prunable are top-level fields on worktree objec

# Get current worktree info (useful for statusline tools)
jq '.[] | select(.is_current == true)'
-
------ stderr -----
diff --git a/tests/snapshots/integration__integration_tests__help__help_merge.snap b/tests/snapshots/integration__integration_tests__help__help_merge.snap
index d23f4d832..bb8ea6e0f 100644
--- a/tests/snapshots/integration__integration_tests__help__help_merge.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_merge.snap
@@ -1,6 +1,5 @@
---
source: tests/integration_tests/help.rs
-assertion_line: 16
info:
program: wt
args:
@@ -10,11 +9,14 @@ info:
CLICOLOR_FORCE: "1"
COLUMNS: "150"
GIT_EDITOR: ""
+ WORKTRUNK_BIN: ""
WORKTRUNK_CONFIG_PATH: /nonexistent/test/config.toml
---
success: true
exit_code: 0
----- stdout -----
+
+----- stderr -----
wt merge - Merge worktree into target branch
Usage: wt merge [OPTIONS] [TARGET]
@@ -115,5 +117,3 @@ Keep worktree after merging:
Skip all hooks:
wt merge --no-verify
-
------ stderr -----
diff --git a/tests/snapshots/integration__integration_tests__help__help_remove.snap b/tests/snapshots/integration__integration_tests__help__help_remove.snap
index 3d0c40e11..f310e75dc 100644
--- a/tests/snapshots/integration__integration_tests__help__help_remove.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_remove.snap
@@ -9,11 +9,14 @@ info:
CLICOLOR_FORCE: "1"
COLUMNS: "150"
GIT_EDITOR: ""
+ WORKTRUNK_BIN: ""
WORKTRUNK_CONFIG_PATH: /nonexistent/test/config.toml
---
success: true
exit_code: 0
----- stdout -----
+
+----- stderr -----
wt remove - Remove worktree and branch
Usage: wt remove [OPTIONS] [WORKTREES]...
@@ -93,5 +96,3 @@ Remove in foreground (blocking):
Switch to default in main:
wt remove # (when already in main worktree)
-
------ stderr -----
diff --git a/tests/snapshots/integration__integration_tests__help__help_root.snap b/tests/snapshots/integration__integration_tests__help__help_root.snap
index 70f7404b1..716f945a5 100644
--- a/tests/snapshots/integration__integration_tests__help__help_root.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_root.snap
@@ -8,11 +8,14 @@ info:
CLICOLOR_FORCE: "1"
COLUMNS: "150"
GIT_EDITOR: ""
+ WORKTRUNK_BIN: ""
WORKTRUNK_CONFIG_PATH: /nonexistent/test/config.toml
---
success: true
exit_code: 0
----- stdout -----
+
+----- stderr -----
wt - Git worktree management
Usage: wt [OPTIONS] <COMMAND>
@@ -42,5 +45,3 @@ Global Options:
Show commands and debug info
See wt config --help for configuration file locations and setup.
-
------ stderr -----
diff --git a/tests/snapshots/integration__integration_tests__help__help_switch.snap b/tests/snapshots/integration__integration_tests__help__help_switch.snap
index 49ce59f8c..6146f2a40 100644
--- a/tests/snapshots/integration__integration_tests__help__help_switch.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_switch.snap
@@ -9,11 +9,14 @@ info:
CLICOLOR_FORCE: "1"
COLUMNS: "150"
GIT_EDITOR: ""
+ WORKTRUNK_BIN: ""
WORKTRUNK_CONFIG_PATH: /nonexistent/test/config.toml
---
success: true
exit_code: 0
----- stdout -----
+
+----- stderr -----
wt switch - Switch to a worktree
Usage: wt switch [OPTIONS] <BRANCH>
@@ -127,5 +130,3 @@ Use @ for current HEAD, - for previous, ^ for main:
wt switch --create new-feature --base=^ # Branch from main (default)
wt switch --create bugfix --base=@ # Branch from current HEAD
wt remove @ # Remove current worktree
-
------ stderr -----