Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
Group picker options under separate help heading in wt switch (#1353)
Maximilian Roos9988530bf899
diff --git a/docs/content/switch.md b/docs/content/switch.mdindex 1365e80d7..cc7bed3bd 100644--- a/docs/content/switch.md+++ b/docs/content/switch.md@@ -176,12 +176,6 @@ Usage: <b><span class=c>wt switch</span></b> <span class=c>[OPTIONS]</span> <spais expanded for templates, then POSIX shell-escaped.<b><span class=g>Options:</span></b>- <b><span class=c>--branches</span></b>- Include branches without worktrees (interactive picker)-- <b><span class=c>--remotes</span></b>- Include remote branches (interactive picker)-<b><span class=c>-c</span></b>, <b><span class=c>--create</span></b>Create a new branch@@ -232,6 +226,13 @@ Usage: <b><span class=c>wt switch</span></b> <span class=c>[OPTIONS]</span> <spa<b><span class=c>-h</span></b>, <b><span class=c>--help</span></b>Print help (see a summary with '-h')+<b><span class=g>Picker Options:</span></b>+ <b><span class=c>--branches</span></b>+ Include branches without worktrees++ <b><span class=c>--remotes</span></b>+ Include remote branches+<b><span class=g>Global Options:</span></b><b><span class=c>-C</span></b><span class=c> <path></span>Working directory for this commanddiff --git a/skills/worktrunk/reference/switch.md b/skills/worktrunk/reference/switch.mdindex c39f6cd3a..122927873 100644--- a/skills/worktrunk/reference/switch.md+++ b/skills/worktrunk/reference/switch.md@@ -146,12 +146,6 @@ Usage: <b><span class=c>wt switch</span></b> <span class=c>[OPTIONS]</span> <spais expanded for templates, then POSIX shell-escaped.<b><span class=g>Options:</span></b>- <b><span class=c>--branches</span></b>- Include branches without worktrees (interactive picker)-- <b><span class=c>--remotes</span></b>- Include remote branches (interactive picker)-<b><span class=c>-c</span></b>, <b><span class=c>--create</span></b>Create a new branch@@ -202,6 +196,13 @@ Usage: <b><span class=c>wt switch</span></b> <span class=c>[OPTIONS]</span> <spa<b><span class=c>-h</span></b>, <b><span class=c>--help</span></b>Print help (see a summary with '-h')+<b><span class=g>Picker Options:</span></b>+ <b><span class=c>--branches</span></b>+ Include branches without worktrees++ <b><span class=c>--remotes</span></b>+ Include remote branches+<b><span class=g>Global Options:</span></b><b><span class=c>-C</span></b><span class=c> <path></span>Working directory for this commanddiff --git a/src/cli/mod.rs b/src/cli/mod.rsindex 46c88832f..e450a6691 100644--- a/src/cli/mod.rs+++ b/src/cli/mod.rs@@ -389,12 +389,12 @@ To change which branch a worktree is on, use `git switch` inside that worktree.#[arg(add = crate::completion::worktree_branch_completer())]branch: Option<String>,- /// Include branches without worktrees (interactive picker)- #[arg(long, conflicts_with_all = ["create", "base", "execute", "execute_args", "clobber"])]+ /// Include branches without worktrees+ #[arg(long, help_heading = "Picker Options", conflicts_with_all = ["create", "base", "execute", "execute_args", "clobber"])]branches: bool,- /// Include remote branches (interactive picker)- #[arg(long, conflicts_with_all = ["create", "base", "execute", "execute_args", "clobber"])]+ /// Include remote branches+ #[arg(long, help_heading = "Picker Options", conflicts_with_all = ["create", "base", "execute", "execute_args", "clobber"])]remotes: bool,/// Create a new branchdiff --git a/tests/snapshots/integration__integration_tests__help__help_switch_long.snap b/tests/snapshots/integration__integration_tests__help__help_switch_long.snapindex a465d4745..8fb9afab6 100644--- a/tests/snapshots/integration__integration_tests__help__help_switch_long.snap+++ b/tests/snapshots/integration__integration_tests__help__help_switch_long.snap@@ -47,12 +47,6 @@ Usage: [1m[36mwt switch[0m [36m[OPTIONS][0m [36m[BRANCH][0m [1m[36m[--Arguments after [1m--[0m are appended to the execute command. Each argument is expanded for templates, then POSIX shell-escaped.[0m[1m[32mOptions:[0m- [1m[36m--branches[0m- Include branches without worktrees (interactive picker)-- [1m[36m--remotes[0m- Include remote branches (interactive picker)-[1m[36m-c[0m, [1m[36m--create[0mCreate a new branch@@ -94,6 +88,13 @@ Usage: [1m[36mwt switch[0m [36m[OPTIONS][0m [36m[BRANCH][0m [1m[36m[--[1m[36m-h[0m, [1m[36m--help[0mPrint help (see a summary with '-h')+[1m[32mPicker Options:[0m+ [1m[36m--branches[0m+ Include branches without worktrees++ [1m[36m--remotes[0m+ Include remote branches+[1m[32mGlobal Options:[0m[1m[36m-C[0m[36m [0m[36m<path>[0mWorking directory for this commanddiff --git a/tests/snapshots/integration__integration_tests__help__help_switch_short.snap b/tests/snapshots/integration__integration_tests__help__help_switch_short.snapindex f5d23502b..032ab19b0 100644--- a/tests/snapshots/integration__integration_tests__help__help_switch_short.snap+++ b/tests/snapshots/integration__integration_tests__help__help_switch_short.snap@@ -11,6 +11,7 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C+ NO_COLOR: ""PSModulePath: ""RUST_LOG: warnSHELL: ""@@ -39,8 +40,6 @@ Usage: [1m[36mwt switch[0m [36m[OPTIONS][0m [36m[BRANCH][0m [1m[36m[--[36m[EXECUTE_ARGS]...[0m Additional arguments for --execute command (after --)[1m[32mOptions:[0m- [1m[36m--branches[0m Include branches without worktrees (interactive picker)- [1m[36m--remotes[0m Include remote branches (interactive picker)[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@@ -50,6 +49,10 @@ Usage: [1m[36mwt switch[0m [36m[OPTIONS][0m [36m[BRANCH][0m [1m[36m[--[1m[36m--no-verify[0m Skip hooks[1m[36m-h[0m, [1m[36m--help[0m Print help (see more with '--help')+[1m[32mPicker Options:[0m+ [1m[36m--branches[0m Include branches without worktrees+ [1m[36m--remotes[0m Include remote branches+[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