Skip to content

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

Preserve ANSI codes in help output

Maximilian Roos03c3aed4a2e1
diff --git a/src/main.rs b/src/main.rs
index 2038df95e..6dc9e46eb 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -92,9 +92,9 @@ fn maybe_handle_help_with_pager() -> bool {
Err(err) => {
match err.kind() {
ErrorKind::DisplayHelp | ErrorKind::DisplayHelpOnMissingArgumentOrSubcommand => {
- // err.render() contains the correctly formatted help
- // (short for -h, long for --help) - no need to re-parse argv
- let mut help = err.render().to_string();
+ // err.render() returns a StyledStr containing ANSI codes.
+ // Use .ansi() to preserve them; .to_string() strips ANSI codes.
+ let mut help = err.render().ansi().to_string();
// Render markdown sections to ANSI
help = md_help::render_markdown_in_help(&help);
diff --git a/tests/snapshots/integration__integration_tests__help__help_beta.snap b/tests/snapshots/integration__integration_tests__help__help_beta.snap
index c62621b4d..65b40b8d3 100644
--- a/tests/snapshots/integration__integration_tests__help__help_beta.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_beta.snap
@@ -19,16 +19,16 @@ exit_code: 0
----- stderr -----
wt beta - Experimental commands
-Usage: wt beta [OPTIONS] <COMMAND>
+Usage: wt beta [OPTIONS] <COMMAND>
-Commands:
- select Interactive worktree selector
- statusline Single-line status for shell prompts
+Commands:
+ select Interactive worktree selector
+ statusline Single-line status for shell prompts
-Options:
- -h, --help Print help
+Options:
+ -h, --help Print help
-Global Options:
- -C <path> Working directory for this command
- --config <path> User config file path
- -v, --verbose Show commands and debug info
+Global Options:
+ -C <path> Working directory for this command
+ --config <path> User config file path
+ -v, --verbose Show commands and debug info
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 e2c010d41..4b65f08e0 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_approvals.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_approvals.snap
@@ -10,6 +10,7 @@ info:
CLICOLOR_FORCE: "1"
COLUMNS: "150"
GIT_EDITOR: ""
+ SOURCE_DATE_EPOCH: "1735776000"
WORKTRUNK_BIN: ""
WORKTRUNK_CONFIG_PATH: /nonexistent/test/config.toml
---
@@ -19,24 +20,24 @@ exit_code: 0
----- stderr -----
wt config approvals - Manage command approvals
-Usage: wt config approvals [OPTIONS] <COMMAND>
+Usage: wt config approvals [OPTIONS] <COMMAND>
-Commands:
- add Store approvals in config
- clear Clear approved commands from config
+Commands:
+ add Store approvals in config
+ clear Clear approved commands from config
-Options:
- -h, --help
+Options:
+ -h, --help
Print help (see a summary with '-h')
-Global Options:
- -C <path>
+Global Options:
+ -C <path>
Working directory for this command
- --config <path>
+ --config <path>
User config file path
- -v, --verbose
+ -v, --verbose
Show commands and debug info
How Approvals Work
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 9f6cfb89e..19883f5a1 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,6 +11,7 @@ info:
CLICOLOR_FORCE: "1"
COLUMNS: "150"
GIT_EDITOR: ""
+ SOURCE_DATE_EPOCH: "1735776000"
WORKTRUNK_BIN: ""
WORKTRUNK_CONFIG_PATH: /nonexistent/test/config.toml
---
@@ -20,26 +21,26 @@ exit_code: 0
----- stderr -----
wt config approvals add - Store approvals in config
-Usage: wt config approvals add [OPTIONS]
+Usage: wt config approvals add [OPTIONS]
-Options:
- -f, --force
+Options:
+ -f, --force
Skip approval prompts
- --all
+ --all
Show all commands
- -h, --help
+ -h, --help
Print help (see a summary with '-h')
-Global Options:
- -C <path>
+Global Options:
+ -C <path>
Working directory for this command
- --config <path>
+ --config <path>
User config file path
- -v, --verbose
+ -v, --verbose
Show commands and debug info
Prompts for approval of all project commands and saves them to user config.
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 995076f41..f9ecd158e 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,6 +11,7 @@ info:
CLICOLOR_FORCE: "1"
COLUMNS: "150"
GIT_EDITOR: ""
+ SOURCE_DATE_EPOCH: "1735776000"
WORKTRUNK_BIN: ""
WORKTRUNK_CONFIG_PATH: /nonexistent/test/config.toml
---
@@ -20,23 +21,23 @@ exit_code: 0
----- stderr -----
wt config approvals clear - Clear approved commands from config
-Usage: wt config approvals clear [OPTIONS]
+Usage: wt config approvals clear [OPTIONS]
-Options:
- -g, --global
+Options:
+ -g, --global
Clear global approvals
- -h, --help
+ -h, --help
Print help (see a summary with '-h')
-Global Options:
- -C <path>
+Global Options:
+ -C <path>
Working directory for this command
- --config <path>
+ --config <path>
User config file path
- -v, --verbose
+ -v, --verbose
Show commands and debug info
Removes saved approvals, requiring re-approval on next command run.
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 969729556..0f2af4916 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_create.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_create.snap
@@ -10,6 +10,7 @@ info:
CLICOLOR_FORCE: "1"
COLUMNS: "150"
GIT_EDITOR: ""
+ SOURCE_DATE_EPOCH: "1735776000"
WORKTRUNK_BIN: ""
WORKTRUNK_CONFIG_PATH: /nonexistent/test/config.toml
---
@@ -19,20 +20,20 @@ exit_code: 0
----- stderr -----
wt config create - Create global configuration file
-Usage: wt config create [OPTIONS]
+Usage: wt config create [OPTIONS]
-Options:
- -h, --help
+Options:
+ -h, --help
Print help (see a summary with '-h')
-Global Options:
- -C <path>
+Global Options:
+ -C <path>
Working directory for this command
- --config <path>
+ --config <path>
User config file path
- -v, --verbose
+ -v, --verbose
Show commands and debug info
Creates ~/.config/worktrunk/config.toml with the following content:
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_long.snap b/tests/snapshots/integration__integration_tests__help__help_config_long.snap
index 8113772aa..e2218549b 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_long.snap
@@ -19,28 +19,28 @@ exit_code: 0
----- stderr -----
wt config - Manage configuration and shell integration
-Usage: wt config [OPTIONS] <COMMAND>
-
-Commands:
- shell Shell integration setup
- create Create global configuration file
- show Show configuration files & locations
- cache Manage caches (CI status, default branch)
- status Manage branch status markers
- approvals Manage command approvals
-
-Options:
- -h, --help
+Usage: wt config [OPTIONS] <COMMAND>
+
+Commands:
+ shell Shell integration setup
+ create Create global configuration file
+ show Show configuration files & locations
+ cache Manage caches (CI status, default branch)
+ status Manage branch status markers
+ approvals Manage command approvals
+
+Options:
+ -h, --help
Print help (see a summary with '-h')
-Global Options:
- -C <path>
+Global Options:
+ -C <path>
Working directory for this command
- --config <path>
+ --config <path>
User config file path
- -v, --verbose
+ -v, --verbose
Show commands and debug info
Setup Guide
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 2c372fc19..cf62bddf3 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_shell.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_shell.snap
@@ -20,17 +20,17 @@ exit_code: 0
----- stderr -----
wt config shell - Shell integration setup
-Usage: wt config shell [OPTIONS] <COMMAND>
+Usage: wt config shell [OPTIONS] <COMMAND>
-Commands:
- init Generate shell integration code
- install Write shell integration to config files
- uninstall Remove shell integration from config files
+Commands:
+ init Generate shell integration code
+ install Write shell integration to config files
+ uninstall Remove shell integration from config files
-Options:
- -h, --help Print help
+Options:
+ -h, --help Print help
-Global Options:
- -C <path> Working directory for this command
- --config <path> User config file path
- -v, --verbose Show commands and debug info
+Global Options:
+ -C <path> Working directory for this command
+ --config <path> User config file path
+ -v, --verbose Show commands and debug info
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_short.snap b/tests/snapshots/integration__integration_tests__help__help_config_short.snap
index 6c3f98985..dfe8cfd47 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_short.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_short.snap
@@ -19,20 +19,20 @@ exit_code: 0
----- stderr -----
wt config - Manage configuration and shell integration
-Usage: wt config [OPTIONS] <COMMAND>
+Usage: wt config [OPTIONS] <COMMAND>
-Commands:
- shell Shell integration setup
- create Create global configuration file
- show Show configuration files & locations
- cache Manage caches (CI status, default branch)
- status Manage branch status markers
- approvals Manage command approvals
+Commands:
+ shell Shell integration setup
+ create Create global configuration file
+ show Show configuration files & locations
+ cache Manage caches (CI status, default branch)
+ status Manage branch status markers
+ approvals Manage command approvals
-Options:
- -h, --help Print help (see more with '--help')
+Options:
+ -h, --help Print help (see more with '--help')
-Global Options:
- -C <path> Working directory for this command
- --config <path> User config file path
- -v, --verbose Show commands and debug info
+Global Options:
+ -C <path> Working directory for this command
+ --config <path> User config file path
+ -v, --verbose Show commands and debug info
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 dcb9cf107..0d99ff654 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_show.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_show.snap
@@ -10,6 +10,7 @@ info:
CLICOLOR_FORCE: "1"
COLUMNS: "150"
GIT_EDITOR: ""
+ SOURCE_DATE_EPOCH: "1735776000"
WORKTRUNK_BIN: ""
WORKTRUNK_CONFIG_PATH: /nonexistent/test/config.toml
---
@@ -19,20 +20,20 @@ exit_code: 0
----- stderr -----
wt config show - Show configuration files & locations
-Usage: wt config show [OPTIONS]
+Usage: wt config show [OPTIONS]
-Options:
- -h, --help
+Options:
+ -h, --help
Print help (see a summary with '-h')
-Global Options:
- -C <path>
+Global Options:
+ -C <path>
Working directory for this command
- --config <path>
+ --config <path>
User config file path
- -v, --verbose
+ -v, --verbose
Show commands and debug info
Shows location and contents of global config (~/.config/worktrunk/config.toml)
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 69612ad64..ca9eabe85 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,6 +11,7 @@ info:
CLICOLOR_FORCE: "1"
COLUMNS: "150"
GIT_EDITOR: ""
+ SOURCE_DATE_EPOCH: "1735776000"
WORKTRUNK_BIN: ""
WORKTRUNK_CONFIG_PATH: /nonexistent/test/config.toml
---
@@ -20,27 +21,27 @@ exit_code: 0
----- stderr -----
wt config status set - Set status emoji for branch
-Usage: wt config status set [OPTIONS] <VALUE>
+Usage: wt config status set [OPTIONS] <VALUE>
-Arguments:
- <VALUE>
+Arguments:
+ <VALUE>
Status emoji to display
-Options:
- --branch <BRANCH>
+Options:
+ --branch <BRANCH>
Target branch (defaults to current)
- -h, --help
+ -h, --help
Print help (see a summary with '-h')
-Global Options:
- -C <path>
+Global Options:
+ -C <path>
Working directory for this command
- --config <path>
+ --config <path>
User config file path
- -v, --verbose
+ -v, --verbose
Show commands and debug info
Sets a custom status marker that appears in wt list output.
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 6bd7bfe98..1495cc1cd 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,6 +11,7 @@ info:
CLICOLOR_FORCE: "1"
COLUMNS: "150"
GIT_EDITOR: ""
+ SOURCE_DATE_EPOCH: "1735776000"
WORKTRUNK_BIN: ""
WORKTRUNK_CONFIG_PATH: /nonexistent/test/config.toml
---
@@ -20,26 +21,26 @@ exit_code: 0
----- stderr -----
wt config status unset - Clear status emoji
-Usage: wt config status unset [OPTIONS] [TARGET]
+Usage: wt config status unset [OPTIONS] [TARGET]
-Arguments:
- [TARGET]
+Arguments:
+ [TARGET]
Branch or '*' for all
[default: ]
-Options:
- -h, --help
+Options:
+ -h, --help
Print help (see a summary with '-h')
-Global Options:
- -C <path>
+Global Options:
+ -C <path>
Working directory for this command
- --config <path>
+ --config <path>
User config file path
- -v, --verbose
+ -v, --verbose
Show commands and debug info
Removes status marker from branch(es). Use '*' to clear all statuses.
diff --git a/tests/snapshots/integration__integration_tests__help__help_list_long.snap b/tests/snapshots/integration__integration_tests__help__help_list_long.snap
index fcf4298a7..f14e5f7e4 100644
--- a/tests/snapshots/integration__integration_tests__help__help_list_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_list_long.snap
@@ -19,39 +19,39 @@ exit_code: 0
----- stderr -----
wt list - List worktrees and optionally branches
-Usage: wt list [OPTIONS]
+Usage: wt list [OPTIONS]
-Options:
- --format <FORMAT>
+Options:
+ --format <FORMAT>
Output format (table, json)
[default: table]
- --branches
+ --branches
Include branches without worktrees
- --remotes
+ --remotes
Include remote branches
- --full
+ --full
Show CI, conflicts, diffs
- --progressive
- Show fast info immediately, update with slow info
-
- Displays local data (branches, paths, status) first, then updates with remote data (CI, upstream) as it arrives. Auto-enabled for TTY.
+ --progressive
+ Show fast info immediately, update with slow info
+ 
+ Displays local data (branches, paths, status) first, then updates with remote data (CI, upstream) as it arrives. Auto-enabled for TTY.
- -h, --help
+ -h, --help
Print help (see a summary with '-h')
-Global Options:
- -C <path>
+Global Options:
+ -C <path>
Working directory for this command
- --config <path>
+ --config <path>
User config file path
- -v, --verbose
+ -v, --verbose
Show commands and debug info
Columns
diff --git a/tests/snapshots/integration__integration_tests__help__help_list_short.snap b/tests/snapshots/integration__integration_tests__help__help_list_short.snap
index 756dc5f9e..551cd0448 100644
--- a/tests/snapshots/integration__integration_tests__help__help_list_short.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_list_short.snap
@@ -19,17 +19,17 @@ exit_code: 0
----- stderr -----
wt list - List worktrees and optionally branches
-Usage: wt list [OPTIONS]
+Usage: wt list [OPTIONS]
-Options:
- --format <FORMAT> Output format (table, json) [default: table]
- --branches Include branches without worktrees
- --remotes Include remote branches
- --full Show CI, conflicts, diffs
- --progressive Show fast info immediately, update with slow info
- -h, --help Print help (see more with '--help')
+Options:
+ --format <FORMAT> Output format (table, json) [default: table]
+ --branches Include branches without worktrees
+ --remotes Include remote branches
+ --full Show CI, conflicts, diffs
+ --progressive Show fast info immediately, update with slow info
+ -h, --help Print help (see more with '--help')
-Global Options:
- -C <path> Working directory for this command
- --config <path> User config file path
- -v, --verbose Show commands and debug info
+Global Options:
+ -C <path> Working directory for this command
+ --config <path> User config file path
+ -v, --verbose Show commands and debug info
diff --git a/tests/snapshots/integration__integration_tests__help__help_merge_long.snap b/tests/snapshots/integration__integration_tests__help__help_merge_long.snap
index 044c12b31..ffc7b215a 100644
--- a/tests/snapshots/integration__integration_tests__help__help_merge_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_merge_long.snap
@@ -19,49 +19,49 @@ exit_code: 0
----- stderr -----
wt merge - Merge worktree into target branch
-Usage: wt merge [OPTIONS] [TARGET]
+Usage: wt merge [OPTIONS] [TARGET]
-Arguments:
- [TARGET]
- Target branch
-
- Defaults to default branch.
+Arguments:
+ [TARGET]
+ Target branch
+ 
+ Defaults to default branch.
-Options:
- --no-squash
+Options:
+ --no-squash
Skip commit squashing
- --no-commit
+ --no-commit
Skip commit, squash, and rebase
- --no-remove
+ --no-remove
Keep worktree after merge
- --no-verify
+ --no-verify
Skip all project hooks
- -f, --force
+ -f, --force
Skip approval prompts
- --stage <STAGE>
+ --stage <STAGE>
What to stage before committing [default: all]
Possible values:
- - all: Stage everything: untracked files + unstaged tracked changes
- - tracked: Stage tracked changes only (like git add -u)
- - none: Stage nothing, commit only what's already in the index
+ - all: Stage everything: untracked files + unstaged tracked changes
+ - tracked: Stage tracked changes only (like git add -u)
+ - none: Stage nothing, commit only what's already in the index
- -h, --help
+ -h, --help
Print help (see a summary with '-h')
-Global Options:
- -C <path>
+Global Options:
+ -C <path>
Working directory for this command
- --config <path>
+ --config <path>
User config file path
- -v, --verbose
+ -v, --verbose
Show commands and debug info
Operation
diff --git a/tests/snapshots/integration__integration_tests__help__help_merge_short.snap b/tests/snapshots/integration__integration_tests__help__help_merge_short.snap
index c1c4e6091..8a4da324c 100644
--- a/tests/snapshots/integration__integration_tests__help__help_merge_short.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_merge_short.snap
@@ -19,21 +19,21 @@ exit_code: 0
----- stderr -----
wt merge - Merge worktree into target branch
-Usage: wt merge [OPTIONS] [TARGET]
+Usage: wt merge [OPTIONS] [TARGET]
-Arguments:
- [TARGET] Target branch
+Arguments:
+ [TARGET] Target branch
-Options:
- --no-squash Skip commit squashing
- --no-commit Skip commit, squash, and rebase
- --no-remove Keep worktree after merge
- --no-verify Skip all project hooks
- -f, --force Skip approval prompts
- --stage <STAGE> What to stage before committing [default: all] [possible values: all, tracked, none]
- -h, --help Print help (see more with '--help')
+Options:
+ --no-squash Skip commit squashing
+ --no-commit Skip commit, squash, and rebase
+ --no-remove Keep worktree after merge
+ --no-verify Skip all project hooks
+ -f, --force Skip approval prompts
+ --stage <STAGE> What to stage before committing [default: all] [possible values: all, tracked, none]
+ -h, --help Print help (see more with '--help')
-Global Options:
- -C <path> Working directory for this command
- --config <path> User config file path
- -v, --verbose Show commands and debug info
+Global Options:
+ -C <path> Working directory for this command
+ --config <path> User config file path
+ -v, --verbose Show commands and debug info
diff --git a/tests/snapshots/integration__integration_tests__help__help_no_args.snap b/tests/snapshots/integration__integration_tests__help__help_no_args.snap
index 8e80b85f2..00c49e29c 100644
--- a/tests/snapshots/integration__integration_tests__help__help_no_args.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_no_args.snap
@@ -17,21 +17,21 @@ exit_code: 0
----- stderr -----
wt - Git worktree management
-Usage: wt [OPTIONS] <COMMAND>
+Usage: wt [OPTIONS] <COMMAND>
-Commands:
- config Manage configuration and shell integration
- step Workflow building blocks
- list List worktrees and optionally branches
- switch Switch to a worktree
- remove Remove worktree and branch
- merge Merge worktree into target branch
+Commands:
+ config Manage configuration and shell integration
+ step Workflow building blocks
+ list List worktrees and optionally branches
+ switch Switch to a worktree
+ remove Remove worktree and branch
+ merge Merge worktree into target branch
-Options:
- -h, --help Print help (see more with '--help')
- -V, --version Print version
+Options:
+ -h, --help Print help (see more with '--help')
+ -V, --version Print version
-Global Options:
- -C <path> Working directory for this command
- --config <path> User config file path
- -v, --verbose Show commands and debug info
+Global Options:
+ -C <path> Working directory for this command
+ --config <path> User config file path
+ -v, --verbose Show commands and debug info
diff --git a/tests/snapshots/integration__integration_tests__help__help_remove_long.snap b/tests/snapshots/integration__integration_tests__help__help_remove_long.snap
index de3cd59df..e6a796e2a 100644
--- a/tests/snapshots/integration__integration_tests__help__help_remove_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_remove_long.snap
@@ -19,33 +19,33 @@ exit_code: 0
----- stderr -----
wt remove - Remove worktree and branch
-Usage: wt remove [OPTIONS] [WORKTREES]...
+Usage: wt remove [OPTIONS] [WORKTREES]...
-Arguments:
- [WORKTREES]...
+Arguments:
+ [WORKTREES]...
Worktree or branch (@ for current)
-Options:
- --no-delete-branch
+Options:
+ --no-delete-branch
Keep branch after removal
- -D, --force-delete
+ -D, --force-delete
Delete unmerged branches
- --no-background
+ --no-background
Run removal in foreground
- -h, --help
+ -h, --help
Print help (see a summary with '-h')
-Global Options:
- -C <path>
+Global Options:
+ -C <path>
Working directory for this command
- --config <path>
+ --config <path>
User config file path
- -v, --verbose
+ -v, --verbose
Show commands and debug info
Operation
diff --git a/tests/snapshots/integration__integration_tests__help__help_remove_short.snap b/tests/snapshots/integration__integration_tests__help__help_remove_short.snap
index e6abf7b05..f876bfc81 100644
--- a/tests/snapshots/integration__integration_tests__help__help_remove_short.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_remove_short.snap
@@ -19,18 +19,18 @@ exit_code: 0
----- stderr -----
wt remove - Remove worktree and branch
-Usage: wt remove [OPTIONS] [WORKTREES]...
+Usage: wt remove [OPTIONS] [WORKTREES]...
-Arguments:
- [WORKTREES]... Worktree or branch (@ for current)
+Arguments:
+ [WORKTREES]... Worktree or branch (@ for current)
-Options:
- --no-delete-branch Keep branch after removal
- -D, --force-delete Delete unmerged branches
- --no-background Run removal in foreground
- -h, --help Print help (see more with '--help')
+Options:
+ --no-delete-branch Keep branch after removal
+ -D, --force-delete Delete unmerged branches
+ --no-background Run removal in foreground
+ -h, --help Print help (see more with '--help')
-Global Options:
- -C <path> Working directory for this command
- --config <path> User config file path
- -v, --verbose Show commands and debug info
+Global Options:
+ -C <path> Working directory for this command
+ --config <path> User config file path
+ -v, --verbose Show commands and debug info
diff --git a/tests/snapshots/integration__integration_tests__help__help_root_long.snap b/tests/snapshots/integration__integration_tests__help__help_root_long.snap
index cb898cdab..5c3c782ef 100644
--- a/tests/snapshots/integration__integration_tests__help__help_root_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_root_long.snap
@@ -18,31 +18,31 @@ exit_code: 0
----- stderr -----
wt - Git worktree management
-Usage: wt [OPTIONS] <COMMAND>
-
-Commands:
- config Manage configuration and shell integration
- step Workflow building blocks
- list List worktrees and optionally branches
- switch Switch to a worktree
- remove Remove worktree and branch
- merge Merge worktree into target branch
-
-Options:
- -h, --help
+Usage: wt [OPTIONS] <COMMAND>
+
+Commands:
+ config Manage configuration and shell integration
+ step Workflow building blocks
+ list List worktrees and optionally branches
+ switch Switch to a worktree
+ remove Remove worktree and branch
+ merge Merge worktree into target branch
+
+Options:
+ -h, --help
Print help (see a summary with '-h')
- -V, --version
+ -V, --version
Print version
-Global Options:
- -C <path>
+Global Options:
+ -C <path>
Working directory for this command
- --config <path>
+ --config <path>
User config file path
- -v, --verbose
+ -v, --verbose
Show commands and debug info
See wt config --help for configuration file locations and setup.
diff --git a/tests/snapshots/integration__integration_tests__help__help_root_short.snap b/tests/snapshots/integration__integration_tests__help__help_root_short.snap
index 24e4c9184..52585dbfc 100644
--- a/tests/snapshots/integration__integration_tests__help__help_root_short.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_root_short.snap
@@ -18,21 +18,21 @@ exit_code: 0
----- stderr -----
wt - Git worktree management
-Usage: wt [OPTIONS] <COMMAND>
+Usage: wt [OPTIONS] <COMMAND>
-Commands:
- config Manage configuration and shell integration
- step Workflow building blocks
- list List worktrees and optionally branches
- switch Switch to a worktree
- remove Remove worktree and branch
- merge Merge worktree into target branch
+Commands:
+ config Manage configuration and shell integration
+ step Workflow building blocks
+ list List worktrees and optionally branches
+ switch Switch to a worktree
+ remove Remove worktree and branch
+ merge Merge worktree into target branch
-Options:
- -h, --help Print help (see more with '--help')
- -V, --version Print version
+Options:
+ -h, --help Print help (see more with '--help')
+ -V, --version Print version
-Global Options:
- -C <path> Working directory for this command
- --config <path> User config file path
- -v, --verbose Show commands and debug info
+Global Options:
+ -C <path> Working directory for this command
+ --config <path> User config file path
+ -v, --verbose Show commands and debug info
diff --git a/tests/snapshots/integration__integration_tests__help__help_step_long.snap b/tests/snapshots/integration__integration_tests__help__help_step_long.snap
index 68345b700..76c0f49fd 100644
--- a/tests/snapshots/integration__integration_tests__help__help_step_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_step_long.snap
@@ -19,23 +19,23 @@ exit_code: 0
----- stderr -----
wt step - Workflow building blocks
-Usage: wt step [OPTIONS] <COMMAND>
+Usage: wt step [OPTIONS] <COMMAND>
-Commands:
- commit Commit changes with LLM commit message
- squash Squash commits with LLM commit message
- push Push changes to local target branch
- rebase Rebase onto target
- post-create Run post-create hook
- post-start Run post-start hook
- pre-commit Run pre-commit hook
- pre-merge Run pre-merge hook
- post-merge Run post-merge hook
+Commands:
+ commit Commit changes with LLM commit message
+ squash Squash commits with LLM commit message
+ push Push changes to local target branch
+ rebase Rebase onto target
+ post-create Run post-create hook
+ post-start Run post-start hook
+ pre-commit Run pre-commit hook
+ pre-merge Run pre-merge hook
+ post-merge Run post-merge hook
-Options:
- -h, --help Print help
+Options:
+ -h, --help Print help
-Global Options:
- -C <path> Working directory for this command
- --config <path> User config file path
- -v, --verbose Show commands and debug info
+Global Options:
+ -C <path> Working directory for this command
+ --config <path> User config file path
+ -v, --verbose Show commands and debug info
diff --git a/tests/snapshots/integration__integration_tests__help__help_step_short.snap b/tests/snapshots/integration__integration_tests__help__help_step_short.snap
index 9a698d6db..6f155028a 100644
--- a/tests/snapshots/integration__integration_tests__help__help_step_short.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_step_short.snap
@@ -19,23 +19,23 @@ exit_code: 0
----- stderr -----
wt step - Workflow building blocks
-Usage: wt step [OPTIONS] <COMMAND>
+Usage: wt step [OPTIONS] <COMMAND>
-Commands:
- commit Commit changes with LLM commit message
- squash Squash commits with LLM commit message
- push Push changes to local target branch
- rebase Rebase onto target
- post-create Run post-create hook
- post-start Run post-start hook
- pre-commit Run pre-commit hook
- pre-merge Run pre-merge hook
- post-merge Run post-merge hook
+Commands:
+ commit Commit changes with LLM commit message
+ squash Squash commits with LLM commit message
+ push Push changes to local target branch
+ rebase Rebase onto target
+ post-create Run post-create hook
+ post-start Run post-start hook
+ pre-commit Run pre-commit hook
+ pre-merge Run pre-merge hook
+ post-merge Run post-merge hook
-Options:
- -h, --help Print help
+Options:
+ -h, --help Print help
-Global Options:
- -C <path> Working directory for this command
- --config <path> User config file path
- -v, --verbose Show commands and debug info
+Global Options:
+ -C <path> Working directory for this command
+ --config <path> User config file path
+ -v, --verbose Show commands and debug info
diff --git a/tests/snapshots/integration__integration_tests__help__help_switch_long.snap b/tests/snapshots/integration__integration_tests__help__help_switch_long.snap
index c0382a635..28715370b 100644
--- a/tests/snapshots/integration__integration_tests__help__help_switch_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_switch_long.snap
@@ -19,41 +19,41 @@ exit_code: 0
----- stderr -----
wt switch - Switch to a worktree
-Usage: wt switch [OPTIONS] <BRANCH>
+Usage: wt switch [OPTIONS] <BRANCH>
-Arguments:
- <BRANCH>
+Arguments:
+ <BRANCH>
Branch, path, '@' (HEAD), '-' (previous), or '^' (main)
-Options:
- -c, --create
+Options:
+ -c, --create
Create a new branch
- -b, --base <BASE>
- Base branch
-
- Defaults to default branch.
+ -b, --base <BASE>
+ Base branch
+ 
+ Defaults to default branch.
- -x, --execute <EXECUTE>
+ -x, --execute <EXECUTE>
Command to run after switch
- -f, --force
+ -f, --force
Skip approval prompts
- --no-verify
+ --no-verify
Skip all project hooks
- -h, --help
+ -h, --help
Print help (see a summary with '-h')
-Global Options:
- -C <path>
+Global Options:
+ -C <path>
Working directory for this command
- --config <path>
+ --config <path>
User config file path
- -v, --verbose
+ -v, --verbose
Show commands and debug info
Operation
diff --git a/tests/snapshots/integration__integration_tests__help__help_switch_short.snap b/tests/snapshots/integration__integration_tests__help__help_switch_short.snap
index 8a31502b9..40f0eaa39 100644
--- a/tests/snapshots/integration__integration_tests__help__help_switch_short.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_switch_short.snap
@@ -19,20 +19,20 @@ exit_code: 0
----- stderr -----
wt switch - Switch to a worktree
-Usage: wt switch [OPTIONS] <BRANCH>
+Usage: wt switch [OPTIONS] <BRANCH>
-Arguments:
- <BRANCH> Branch, path, '@' (HEAD), '-' (previous), or '^' (main)
+Arguments:
+ <BRANCH> Branch, path, '@' (HEAD), '-' (previous), or '^' (main)
-Options:
- -c, --create Create a new branch
- -b, --base <BASE> Base branch
- -x, --execute <EXECUTE> Command to run after switch
- -f, --force Skip approval prompts
- --no-verify Skip all project hooks
- -h, --help Print help (see more with '--help')
+Options:
+ -c, --create Create a new branch
+ -b, --base <BASE> Base branch
+ -x, --execute <EXECUTE> Command to run after switch
+ -f, --force Skip approval prompts
+ --no-verify Skip all project hooks
+ -h, --help Print help (see more with '--help')
-Global Options:
- -C <path> Working directory for this command
- --config <path> User config file path
- -v, --verbose Show commands and debug info
+Global Options:
+ -C <path> Working directory for this command
+ --config <path> User config file path
+ -v, --verbose Show commands and debug info