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.rsindex 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 ANSIhelp = 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.snapindex 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: [1m[36mwt beta[0m [36m[OPTIONS][0m [36m<COMMAND>[0m-Commands:- select Interactive worktree selector- statusline Single-line status for shell prompts+[1m[32mCommands:[0m+ [1m[36mselect[0m Interactive worktree selector+ [1m[36mstatusline[0m Single-line status for shell prompts-Options:- -h, --help Print help+[1m[32mOptions:[0m+ [1m[36m-h[0m, [1m[36m--help[0m Print help-Global Options:- -C <path> Working directory for this command- --config <path> User config file path- -v, --verbose Show commands and debug info+[1m[32mGlobal Options:[0m+ [1m[36m-C[0m[36m [0m[36m<path>[0m Working directory for this command+ [1m[36m--config[0m[36m [0m[36m<path>[0m User config file path+ [1m[36m-v[0m, [1m[36m--verbose[0m Show commands and debug infodiff --git a/tests/snapshots/integration__integration_tests__help__help_config_approvals.snap b/tests/snapshots/integration__integration_tests__help__help_config_approvals.snapindex 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: [1m[36mwt config approvals[0m [36m[OPTIONS][0m [36m<COMMAND>[0m-Commands:- add Store approvals in config- clear Clear approved commands from config+[1m[32mCommands:[0m+ [1m[36madd[0m Store approvals in config+ [1m[36mclear[0m Clear approved commands from config-Options:- -h, --help+[1m[32mOptions:[0m+ [1m[36m-h[0m, [1m[36m--help[0mPrint help (see a summary with '-h')-Global Options:- -C <path>+[1m[32mGlobal Options:[0m+ [1m[36m-C[0m[36m [0m[36m<path>[0mWorking directory for this command- --config <path>+ [1m[36m--config[0m[36m [0m[36m<path>[0mUser config file path- -v, --verbose+ [1m[36m-v[0m, [1m[36m--verbose[0mShow commands and debug info[32mHow Approvals Work[0mdiff --git a/tests/snapshots/integration__integration_tests__help__help_config_approvals_add.snap b/tests/snapshots/integration__integration_tests__help__help_config_approvals_add.snapindex 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: [1m[36mwt config approvals add[0m [36m[OPTIONS][0m-Options:- -f, --force+[1m[32mOptions:[0m+ [1m[36m-f[0m, [1m[36m--force[0mSkip approval prompts- --all+ [1m[36m--all[0mShow all commands- -h, --help+ [1m[36m-h[0m, [1m[36m--help[0mPrint help (see a summary with '-h')-Global Options:- -C <path>+[1m[32mGlobal Options:[0m+ [1m[36m-C[0m[36m [0m[36m<path>[0mWorking directory for this command- --config <path>+ [1m[36m--config[0m[36m [0m[36m<path>[0mUser config file path- -v, --verbose+ [1m[36m-v[0m, [1m[36m--verbose[0mShow commands and debug infoPrompts 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.snapindex 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: [1m[36mwt config approvals clear[0m [36m[OPTIONS][0m-Options:- -g, --global+[1m[32mOptions:[0m+ [1m[36m-g[0m, [1m[36m--global[0mClear global approvals- -h, --help+ [1m[36m-h[0m, [1m[36m--help[0mPrint help (see a summary with '-h')-Global Options:- -C <path>+[1m[32mGlobal Options:[0m+ [1m[36m-C[0m[36m [0m[36m<path>[0mWorking directory for this command- --config <path>+ [1m[36m--config[0m[36m [0m[36m<path>[0mUser config file path- -v, --verbose+ [1m[36m-v[0m, [1m[36m--verbose[0mShow commands and debug infoRemoves 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.snapindex 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: [1m[36mwt config create[0m [36m[OPTIONS][0m-Options:- -h, --help+[1m[32mOptions:[0m+ [1m[36m-h[0m, [1m[36m--help[0mPrint help (see a summary with '-h')-Global Options:- -C <path>+[1m[32mGlobal Options:[0m+ [1m[36m-C[0m[36m [0m[36m<path>[0mWorking directory for this command- --config <path>+ [1m[36m--config[0m[36m [0m[36m<path>[0mUser config file path- -v, --verbose+ [1m[36m-v[0m, [1m[36m--verbose[0mShow commands and debug infoCreates [2m~/.config/worktrunk/config.toml[0m 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.snapindex 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: [1m[36mwt config[0m [36m[OPTIONS][0m [36m<COMMAND>[0m++[1m[32mCommands:[0m+ [1m[36mshell[0m Shell integration setup+ [1m[36mcreate[0m Create global configuration file+ [1m[36mshow[0m Show configuration files & locations+ [1m[36mcache[0m Manage caches (CI status, default branch)+ [1m[36mstatus[0m Manage branch status markers+ [1m[36mapprovals[0m Manage command approvals++[1m[32mOptions:[0m+ [1m[36m-h[0m, [1m[36m--help[0mPrint help (see a summary with '-h')-Global Options:- -C <path>+[1m[32mGlobal Options:[0m+ [1m[36m-C[0m[36m [0m[36m<path>[0mWorking directory for this command- --config <path>+ [1m[36m--config[0m[36m [0m[36m<path>[0mUser config file path- -v, --verbose+ [1m[36m-v[0m, [1m[36m--verbose[0mShow commands and debug info[32mSetup Guide[0mdiff --git a/tests/snapshots/integration__integration_tests__help__help_config_shell.snap b/tests/snapshots/integration__integration_tests__help__help_config_shell.snapindex 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: [1m[36mwt config shell[0m [36m[OPTIONS][0m [36m<COMMAND>[0m-Commands:- init Generate shell integration code- install Write shell integration to config files- uninstall Remove shell integration from config files+[1m[32mCommands:[0m+ [1m[36minit[0m Generate shell integration code+ [1m[36minstall[0m Write shell integration to config files+ [1m[36muninstall[0m Remove shell integration from config files-Options:- -h, --help Print help+[1m[32mOptions:[0m+ [1m[36m-h[0m, [1m[36m--help[0m Print help-Global Options:- -C <path> Working directory for this command- --config <path> User config file path- -v, --verbose Show commands and debug info+[1m[32mGlobal Options:[0m+ [1m[36m-C[0m[36m [0m[36m<path>[0m Working directory for this command+ [1m[36m--config[0m[36m [0m[36m<path>[0m User config file path+ [1m[36m-v[0m, [1m[36m--verbose[0m Show commands and debug infodiff --git a/tests/snapshots/integration__integration_tests__help__help_config_short.snap b/tests/snapshots/integration__integration_tests__help__help_config_short.snapindex 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: [1m[36mwt config[0m [36m[OPTIONS][0m [36m<COMMAND>[0m-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+[1m[32mCommands:[0m+ [1m[36mshell[0m Shell integration setup+ [1m[36mcreate[0m Create global configuration file+ [1m[36mshow[0m Show configuration files & locations+ [1m[36mcache[0m Manage caches (CI status, default branch)+ [1m[36mstatus[0m Manage branch status markers+ [1m[36mapprovals[0m Manage command approvals-Options:- -h, --help Print help (see more with '--help')+[1m[32mOptions:[0m+ [1m[36m-h[0m, [1m[36m--help[0m 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+[1m[32mGlobal Options:[0m+ [1m[36m-C[0m[36m [0m[36m<path>[0m Working directory for this command+ [1m[36m--config[0m[36m [0m[36m<path>[0m User config file path+ [1m[36m-v[0m, [1m[36m--verbose[0m Show commands and debug infodiff --git a/tests/snapshots/integration__integration_tests__help__help_config_show.snap b/tests/snapshots/integration__integration_tests__help__help_config_show.snapindex 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: [1m[36mwt config show[0m [36m[OPTIONS][0m-Options:- -h, --help+[1m[32mOptions:[0m+ [1m[36m-h[0m, [1m[36m--help[0mPrint help (see a summary with '-h')-Global Options:- -C <path>+[1m[32mGlobal Options:[0m+ [1m[36m-C[0m[36m [0m[36m<path>[0mWorking directory for this command- --config <path>+ [1m[36m--config[0m[36m [0m[36m<path>[0mUser config file path- -v, --verbose+ [1m[36m-v[0m, [1m[36m--verbose[0mShow commands and debug infoShows location and contents of global config ([2m~/.config/worktrunk/config.toml[0m)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.snapindex 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: [1m[36mwt config status set[0m [36m[OPTIONS][0m [36m<VALUE>[0m-Arguments:- <VALUE>+[1m[32mArguments:[0m+ [36m<VALUE>[0mStatus emoji to display-Options:- --branch <BRANCH>+[1m[32mOptions:[0m+ [1m[36m--branch[0m[36m [0m[36m<BRANCH>[0mTarget branch (defaults to current)- -h, --help+ [1m[36m-h[0m, [1m[36m--help[0mPrint help (see a summary with '-h')-Global Options:- -C <path>+[1m[32mGlobal Options:[0m+ [1m[36m-C[0m[36m [0m[36m<path>[0mWorking directory for this command- --config <path>+ [1m[36m--config[0m[36m [0m[36m<path>[0mUser config file path- -v, --verbose+ [1m[36m-v[0m, [1m[36m--verbose[0mShow commands and debug infoSets a custom status marker that appears in [2mwt list[0m 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.snapindex 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: [1m[36mwt config status unset[0m [36m[OPTIONS][0m [36m[TARGET][0m-Arguments:- [TARGET]+[1m[32mArguments:[0m+ [36m[TARGET][0mBranch or '*' for all[default: ]-Options:- -h, --help+[1m[32mOptions:[0m+ [1m[36m-h[0m, [1m[36m--help[0mPrint help (see a summary with '-h')-Global Options:- -C <path>+[1m[32mGlobal Options:[0m+ [1m[36m-C[0m[36m [0m[36m<path>[0mWorking directory for this command- --config <path>+ [1m[36m--config[0m[36m [0m[36m<path>[0mUser config file path- -v, --verbose+ [1m[36m-v[0m, [1m[36m--verbose[0mShow commands and debug infoRemoves 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.snapindex 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: [1m[36mwt list[0m [36m[OPTIONS][0m-Options:- --format <FORMAT>+[1m[32mOptions:[0m+ [1m[36m--format[0m[36m [0m[36m<FORMAT>[0mOutput format (table, json)[default: table]- --branches+ [1m[36m--branches[0mInclude branches without worktrees- --remotes+ [1m[36m--remotes[0mInclude remote branches- --full+ [1m[36m--full[0mShow 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.+ [1m[36m--progressive[0m+ Show fast info immediately, update with slow info[0m+ [0m+ Displays local data (branches, paths, status) first, then updates with remote data (CI, upstream) as it arrives. Auto-enabled for TTY.[0m- -h, --help+ [1m[36m-h[0m, [1m[36m--help[0mPrint help (see a summary with '-h')-Global Options:- -C <path>+[1m[32mGlobal Options:[0m+ [1m[36m-C[0m[36m [0m[36m<path>[0mWorking directory for this command- --config <path>+ [1m[36m--config[0m[36m [0m[36m<path>[0mUser config file path- -v, --verbose+ [1m[36m-v[0m, [1m[36m--verbose[0mShow commands and debug info[32mColumns[0mdiff --git a/tests/snapshots/integration__integration_tests__help__help_list_short.snap b/tests/snapshots/integration__integration_tests__help__help_list_short.snapindex 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: [1m[36mwt list[0m [36m[OPTIONS][0m-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')+[1m[32mOptions:[0m+ [1m[36m--format[0m[36m [0m[36m<FORMAT>[0m Output format (table, json) [default: table]+ [1m[36m--branches[0m Include branches without worktrees+ [1m[36m--remotes[0m Include remote branches+ [1m[36m--full[0m Show CI, conflicts, diffs+ [1m[36m--progressive[0m Show fast info immediately, update with slow info+ [1m[36m-h[0m, [1m[36m--help[0m 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+[1m[32mGlobal Options:[0m+ [1m[36m-C[0m[36m [0m[36m<path>[0m Working directory for this command+ [1m[36m--config[0m[36m [0m[36m<path>[0m User config file path+ [1m[36m-v[0m, [1m[36m--verbose[0m Show commands and debug infodiff --git a/tests/snapshots/integration__integration_tests__help__help_merge_long.snap b/tests/snapshots/integration__integration_tests__help__help_merge_long.snapindex 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: [1m[36mwt merge[0m [36m[OPTIONS][0m [36m[TARGET][0m-Arguments:- [TARGET]- Target branch-- Defaults to default branch.+[1m[32mArguments:[0m+ [36m[TARGET][0m+ Target branch[0m+ [0m+ Defaults to default branch.[0m-Options:- --no-squash+[1m[32mOptions:[0m+ [1m[36m--no-squash[0mSkip commit squashing- --no-commit+ [1m[36m--no-commit[0mSkip commit, squash, and rebase- --no-remove+ [1m[36m--no-remove[0mKeep worktree after merge- --no-verify+ [1m[36m--no-verify[0mSkip all project hooks- -f, --force+ [1m[36m-f[0m, [1m[36m--force[0mSkip approval prompts- --stage <STAGE>+ [1m[36m--stage[0m[36m [0m[36m<STAGE>[0mWhat 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+ - [1m[36mall[0m: Stage everything: untracked files + unstaged tracked changes+ - [1m[36mtracked[0m: Stage tracked changes only (like [1mgit add -u[0m)+ - [1m[36mnone[0m: Stage nothing, commit only what's already in the index- -h, --help+ [1m[36m-h[0m, [1m[36m--help[0mPrint help (see a summary with '-h')-Global Options:- -C <path>+[1m[32mGlobal Options:[0m+ [1m[36m-C[0m[36m [0m[36m<path>[0mWorking directory for this command- --config <path>+ [1m[36m--config[0m[36m [0m[36m<path>[0mUser config file path- -v, --verbose+ [1m[36m-v[0m, [1m[36m--verbose[0mShow commands and debug info[32mOperation[0mdiff --git a/tests/snapshots/integration__integration_tests__help__help_merge_short.snap b/tests/snapshots/integration__integration_tests__help__help_merge_short.snapindex 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: [1m[36mwt merge[0m [36m[OPTIONS][0m [36m[TARGET][0m-Arguments:- [TARGET] Target branch+[1m[32mArguments:[0m+ [36m[TARGET][0m 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')+[1m[32mOptions:[0m+ [1m[36m--no-squash[0m Skip commit squashing+ [1m[36m--no-commit[0m Skip commit, squash, and rebase+ [1m[36m--no-remove[0m Keep worktree after merge+ [1m[36m--no-verify[0m Skip all project hooks+ [1m[36m-f[0m, [1m[36m--force[0m Skip approval prompts+ [1m[36m--stage[0m[36m [0m[36m<STAGE>[0m What to stage before committing [default: all] [possible values: all, tracked, none]+ [1m[36m-h[0m, [1m[36m--help[0m 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+[1m[32mGlobal Options:[0m+ [1m[36m-C[0m[36m [0m[36m<path>[0m Working directory for this command+ [1m[36m--config[0m[36m [0m[36m<path>[0m User config file path+ [1m[36m-v[0m, [1m[36m--verbose[0m Show commands and debug infodiff --git a/tests/snapshots/integration__integration_tests__help__help_no_args.snap b/tests/snapshots/integration__integration_tests__help__help_no_args.snapindex 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: [1m[36mwt[0m [36m[OPTIONS][0m [36m<COMMAND>[0m-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+[1m[32mCommands:[0m+ [1m[36mconfig[0m Manage configuration and shell integration+ [1m[36mstep[0m Workflow building blocks+ [1m[36mlist[0m List worktrees and optionally branches+ [1m[36mswitch[0m Switch to a worktree+ [1m[36mremove[0m Remove worktree and branch+ [1m[36mmerge[0m Merge worktree into target branch-Options:- -h, --help Print help (see more with '--help')- -V, --version Print version+[1m[32mOptions:[0m+ [1m[36m-h[0m, [1m[36m--help[0m Print help (see more with '--help')+ [1m[36m-V[0m, [1m[36m--version[0m Print version-Global Options:- -C <path> Working directory for this command- --config <path> User config file path- -v, --verbose Show commands and debug info+[1m[32mGlobal Options:[0m+ [1m[36m-C[0m[36m [0m[36m<path>[0m Working directory for this command+ [1m[36m--config[0m[36m [0m[36m<path>[0m User config file path+ [1m[36m-v[0m, [1m[36m--verbose[0m Show commands and debug infodiff --git a/tests/snapshots/integration__integration_tests__help__help_remove_long.snap b/tests/snapshots/integration__integration_tests__help__help_remove_long.snapindex 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: [1m[36mwt remove[0m [36m[OPTIONS][0m [36m[WORKTREES]...[0m-Arguments:- [WORKTREES]...+[1m[32mArguments:[0m+ [36m[WORKTREES]...[0mWorktree or branch (@ for current)-Options:- --no-delete-branch+[1m[32mOptions:[0m+ [1m[36m--no-delete-branch[0mKeep branch after removal- -D, --force-delete+ [1m[36m-D[0m, [1m[36m--force-delete[0mDelete unmerged branches- --no-background+ [1m[36m--no-background[0mRun removal in foreground- -h, --help+ [1m[36m-h[0m, [1m[36m--help[0mPrint help (see a summary with '-h')-Global Options:- -C <path>+[1m[32mGlobal Options:[0m+ [1m[36m-C[0m[36m [0m[36m<path>[0mWorking directory for this command- --config <path>+ [1m[36m--config[0m[36m [0m[36m<path>[0mUser config file path- -v, --verbose+ [1m[36m-v[0m, [1m[36m--verbose[0mShow commands and debug info[32mOperation[0mdiff --git a/tests/snapshots/integration__integration_tests__help__help_remove_short.snap b/tests/snapshots/integration__integration_tests__help__help_remove_short.snapindex 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: [1m[36mwt remove[0m [36m[OPTIONS][0m [36m[WORKTREES]...[0m-Arguments:- [WORKTREES]... Worktree or branch (@ for current)+[1m[32mArguments:[0m+ [36m[WORKTREES]...[0m 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')+[1m[32mOptions:[0m+ [1m[36m--no-delete-branch[0m Keep branch after removal+ [1m[36m-D[0m, [1m[36m--force-delete[0m Delete unmerged branches+ [1m[36m--no-background[0m Run removal in foreground+ [1m[36m-h[0m, [1m[36m--help[0m 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+[1m[32mGlobal Options:[0m+ [1m[36m-C[0m[36m [0m[36m<path>[0m Working directory for this command+ [1m[36m--config[0m[36m [0m[36m<path>[0m User config file path+ [1m[36m-v[0m, [1m[36m--verbose[0m Show commands and debug infodiff --git a/tests/snapshots/integration__integration_tests__help__help_root_long.snap b/tests/snapshots/integration__integration_tests__help__help_root_long.snapindex 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: [1m[36mwt[0m [36m[OPTIONS][0m [36m<COMMAND>[0m++[1m[32mCommands:[0m+ [1m[36mconfig[0m Manage configuration and shell integration+ [1m[36mstep[0m Workflow building blocks+ [1m[36mlist[0m List worktrees and optionally branches+ [1m[36mswitch[0m Switch to a worktree+ [1m[36mremove[0m Remove worktree and branch+ [1m[36mmerge[0m Merge worktree into target branch++[1m[32mOptions:[0m+ [1m[36m-h[0m, [1m[36m--help[0mPrint help (see a summary with '-h')- -V, --version+ [1m[36m-V[0m, [1m[36m--version[0mPrint version-Global Options:- -C <path>+[1m[32mGlobal Options:[0m+ [1m[36m-C[0m[36m [0m[36m<path>[0mWorking directory for this command- --config <path>+ [1m[36m--config[0m[36m [0m[36m<path>[0mUser config file path- -v, --verbose+ [1m[36m-v[0m, [1m[36m--verbose[0mShow commands and debug infoSee [2mwt config --help[0m 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.snapindex 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: [1m[36mwt[0m [36m[OPTIONS][0m [36m<COMMAND>[0m-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+[1m[32mCommands:[0m+ [1m[36mconfig[0m Manage configuration and shell integration+ [1m[36mstep[0m Workflow building blocks+ [1m[36mlist[0m List worktrees and optionally branches+ [1m[36mswitch[0m Switch to a worktree+ [1m[36mremove[0m Remove worktree and branch+ [1m[36mmerge[0m Merge worktree into target branch-Options:- -h, --help Print help (see more with '--help')- -V, --version Print version+[1m[32mOptions:[0m+ [1m[36m-h[0m, [1m[36m--help[0m Print help (see more with '--help')+ [1m[36m-V[0m, [1m[36m--version[0m Print version-Global Options:- -C <path> Working directory for this command- --config <path> User config file path- -v, --verbose Show commands and debug info+[1m[32mGlobal Options:[0m+ [1m[36m-C[0m[36m [0m[36m<path>[0m Working directory for this command+ [1m[36m--config[0m[36m [0m[36m<path>[0m User config file path+ [1m[36m-v[0m, [1m[36m--verbose[0m Show commands and debug infodiff --git a/tests/snapshots/integration__integration_tests__help__help_step_long.snap b/tests/snapshots/integration__integration_tests__help__help_step_long.snapindex 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: [1m[36mwt step[0m [36m[OPTIONS][0m [36m<COMMAND>[0m-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+[1m[32mCommands:[0m+ [1m[36mcommit[0m Commit changes with LLM commit message+ [1m[36msquash[0m Squash commits with LLM commit message+ [1m[36mpush[0m Push changes to local target branch+ [1m[36mrebase[0m Rebase onto target+ [1m[36mpost-create[0m Run post-create hook+ [1m[36mpost-start[0m Run post-start hook+ [1m[36mpre-commit[0m Run pre-commit hook+ [1m[36mpre-merge[0m Run pre-merge hook+ [1m[36mpost-merge[0m Run post-merge hook-Options:- -h, --help Print help+[1m[32mOptions:[0m+ [1m[36m-h[0m, [1m[36m--help[0m Print help-Global Options:- -C <path> Working directory for this command- --config <path> User config file path- -v, --verbose Show commands and debug info+[1m[32mGlobal Options:[0m+ [1m[36m-C[0m[36m [0m[36m<path>[0m Working directory for this command+ [1m[36m--config[0m[36m [0m[36m<path>[0m User config file path+ [1m[36m-v[0m, [1m[36m--verbose[0m Show commands and debug infodiff --git a/tests/snapshots/integration__integration_tests__help__help_step_short.snap b/tests/snapshots/integration__integration_tests__help__help_step_short.snapindex 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: [1m[36mwt step[0m [36m[OPTIONS][0m [36m<COMMAND>[0m-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+[1m[32mCommands:[0m+ [1m[36mcommit[0m Commit changes with LLM commit message+ [1m[36msquash[0m Squash commits with LLM commit message+ [1m[36mpush[0m Push changes to local target branch+ [1m[36mrebase[0m Rebase onto target+ [1m[36mpost-create[0m Run post-create hook+ [1m[36mpost-start[0m Run post-start hook+ [1m[36mpre-commit[0m Run pre-commit hook+ [1m[36mpre-merge[0m Run pre-merge hook+ [1m[36mpost-merge[0m Run post-merge hook-Options:- -h, --help Print help+[1m[32mOptions:[0m+ [1m[36m-h[0m, [1m[36m--help[0m Print help-Global Options:- -C <path> Working directory for this command- --config <path> User config file path- -v, --verbose Show commands and debug info+[1m[32mGlobal Options:[0m+ [1m[36m-C[0m[36m [0m[36m<path>[0m Working directory for this command+ [1m[36m--config[0m[36m [0m[36m<path>[0m User config file path+ [1m[36m-v[0m, [1m[36m--verbose[0m Show commands and debug infodiff --git a/tests/snapshots/integration__integration_tests__help__help_switch_long.snap b/tests/snapshots/integration__integration_tests__help__help_switch_long.snapindex 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: [1m[36mwt switch[0m [36m[OPTIONS][0m [36m<BRANCH>[0m-Arguments:- <BRANCH>+[1m[32mArguments:[0m+ [36m<BRANCH>[0mBranch, path, '@' (HEAD), '-' (previous), or '^' (main)-Options:- -c, --create+[1m[32mOptions:[0m+ [1m[36m-c[0m, [1m[36m--create[0mCreate a new branch- -b, --base <BASE>- Base branch-- Defaults to default branch.+ [1m[36m-b[0m, [1m[36m--base[0m[36m [0m[36m<BASE>[0m+ Base branch[0m+ [0m+ Defaults to default branch.[0m- -x, --execute <EXECUTE>+ [1m[36m-x[0m, [1m[36m--execute[0m[36m [0m[36m<EXECUTE>[0mCommand to run after switch- -f, --force+ [1m[36m-f[0m, [1m[36m--force[0mSkip approval prompts- --no-verify+ [1m[36m--no-verify[0mSkip all project hooks- -h, --help+ [1m[36m-h[0m, [1m[36m--help[0mPrint help (see a summary with '-h')-Global Options:- -C <path>+[1m[32mGlobal Options:[0m+ [1m[36m-C[0m[36m [0m[36m<path>[0mWorking directory for this command- --config <path>+ [1m[36m--config[0m[36m [0m[36m<path>[0mUser config file path- -v, --verbose+ [1m[36m-v[0m, [1m[36m--verbose[0mShow commands and debug info[32mOperation[0mdiff --git a/tests/snapshots/integration__integration_tests__help__help_switch_short.snap b/tests/snapshots/integration__integration_tests__help__help_switch_short.snapindex 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: [1m[36mwt switch[0m [36m[OPTIONS][0m [36m<BRANCH>[0m-Arguments:- <BRANCH> Branch, path, '@' (HEAD), '-' (previous), or '^' (main)+[1m[32mArguments:[0m+ [36m<BRANCH>[0m 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')+[1m[32mOptions:[0m+ [1m[36m-c[0m, [1m[36m--create[0m Create a new branch+ [1m[36m-b[0m, [1m[36m--base[0m[36m [0m[36m<BASE>[0m Base branch+ [1m[36m-x[0m, [1m[36m--execute[0m[36m [0m[36m<EXECUTE>[0m Command to run after switch+ [1m[36m-f[0m, [1m[36m--force[0m Skip approval prompts+ [1m[36m--no-verify[0m Skip all project hooks+ [1m[36m-h[0m, [1m[36m--help[0m 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+[1m[32mGlobal Options:[0m+ [1m[36m-C[0m[36m [0m[36m<path>[0m Working directory for this command+ [1m[36m--config[0m[36m [0m[36m<path>[0m User config file path+ [1m[36m-v[0m, [1m[36m--verbose[0m Show commands and debug info