Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
docs: improve help text for select, squash, and merge (#413)
Maximilian Roos974b35607063
diff --git a/docs/content/merge.md b/docs/content/merge.mdindex f17727a40..d3733a451 100644--- a/docs/content/merge.md+++ b/docs/content/merge.md@@ -88,8 +88,7 @@ lint = "cargo clippy"{% terminal() %}wt merge - Merge worktree into target branch-Squashes commits, rebases, runs hooks, merges to target, and removes the-worktree.+Squash & rebase, fast-forward target, remove the worktree.Usage: <b><span class=c>wt merge</span></b> <span class=c>[OPTIONS]</span> <span class=c>[TARGET]</span>diff --git a/docs/content/select.md b/docs/content/select.mdindex 7eee6bfbd..437ab90f4 100644--- a/docs/content/select.md+++ b/docs/content/select.md@@ -57,7 +57,7 @@ Branches without worktrees are included — selecting one creates a worktree. (`{% terminal() %}wt select - Interactive worktree selector-Toggle preview tabs with 1/2/3 keys. Toggle preview visibility with alt-p.+Browse and switch worktrees with live preview.Usage: <b><span class=c>wt select</span></b> <span class=c>[OPTIONS]</span>diff --git a/docs/content/step.md b/docs/content/step.mdindex 248e95f77..b2bfcdd51 100644--- a/docs/content/step.md+++ b/docs/content/step.md@@ -50,7 +50,7 @@ Usage: <b><span class=c>wt step</span></b> <span class=c>[OPTIONS]</span> <span<b><span class=g>Commands:</span></b><b><span class=c>commit</span></b> Commit changes with LLM commit message- <b><span class=c>squash</span></b> Squash commits since target+ <b><span class=c>squash</span></b> Squash commits since branching<b><span class=c>push</span></b> Fast-forward target to current branch<b><span class=c>rebase</span></b> Rebase onto target<b><span class=c>for-each</span></b> [experimental] Run command in each worktreediff --git a/src/cli.rs b/src/cli.rsindex c80e1aad8..1adb4010e 100644--- a/src/cli.rs+++ b/src/cli.rs@@ -888,7 +888,7 @@ pub enum StepCommand {show_prompt: bool,},- /// Squash commits since target+ /// Squash commits since branching////// Stages working tree changes, squashes all commits since diverging from target into one, generates message with LLM.Squash {@@ -1962,7 +1962,7 @@ fi/// Interactive worktree selector///- /// Toggle preview tabs with 1/2/3 keys. Toggle preview visibility with alt-p.+ /// Browse and switch worktrees with live preview.#[cfg_attr(not(unix), command(hide = true))]#[command(after_long_help = r#"Interactive worktree picker with live preview. Navigate worktrees with keyboard shortcuts and press Enter to switch.@@ -2489,7 +2489,7 @@ Removal runs in the background by default (returns immediately). Logs are writte/// Merge worktree into target branch///- /// Squashes commits, rebases, runs hooks, merges to target, and removes the worktree.+ /// Squash & rebase, fast-forward target, remove the worktree.#[command(after_long_help = r#"Run from a feature worktree to merge into the default branch — like clicking "Merge pull request" on GitHub.<!-- demo: wt-merge.gif 1600x900 -->diff --git a/tests/snapshots/integration__integration_tests__help__help_md_merge.snap b/tests/snapshots/integration__integration_tests__help__help_md_merge.snapindex 3497e7475..0903008f5 100644--- a/tests/snapshots/integration__integration_tests__help__help_md_merge.snap+++ b/tests/snapshots/integration__integration_tests__help__help_md_merge.snap@@ -12,13 +12,14 @@ info:RUST_LOG: warnSOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_CONFIG_PATH: /nonexistent/test/config.toml+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"---success: trueexit_code: 0----- stdout -----wt merge - Merge worktree into target branch-Squashes commits, rebases, runs hooks, merges to target, and removes the worktree.+Squash & rebase, fast-forward target, remove the worktree.Usage: wt merge [OPTIONS] [TARGET]diff --git a/tests/snapshots/integration__integration_tests__help__help_merge_long.snap b/tests/snapshots/integration__integration_tests__help__help_merge_long.snapindex 119fa2221..68b2b522f 100644--- a/tests/snapshots/integration__integration_tests__help__help_merge_long.snap+++ b/tests/snapshots/integration__integration_tests__help__help_merge_long.snap@@ -12,6 +12,7 @@ info:RUST_LOG: warnSOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_CONFIG_PATH: /nonexistent/test/config.toml+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"---success: trueexit_code: 0@@ -20,7 +21,7 @@ exit_code: 0----- stderr -----wt merge - Merge worktree into target branch-Squashes commits, rebases, runs hooks, merges to target, and removes the worktree.+Squash & rebase, fast-forward target, remove the worktree.Usage: [1m[36mwt merge[0m [36m[OPTIONS][0m [36m[TARGET]diff --git a/tests/snapshots/integration__integration_tests__help__help_page_merge.snap b/tests/snapshots/integration__integration_tests__help__help_page_merge.snapindex e3e690ec7..af9f33cad 100644--- a/tests/snapshots/integration__integration_tests__help__help_page_merge.snap+++ b/tests/snapshots/integration__integration_tests__help__help_page_merge.snap@@ -99,8 +99,7 @@ lint = "cargo clippy"```wt merge - Merge worktree into target branch[0m[0m-Squashes commits, rebases, runs hooks, merges to target, and removes the-worktree.[0m+Squash & rebase, fast-forward target, remove the worktree.[0mUsage: [1m[36mwt merge[0m [36m[OPTIONS][0m [36m[TARGET][0mdiff --git a/tests/snapshots/integration__integration_tests__help__help_step_long.snap b/tests/snapshots/integration__integration_tests__help__help_step_long.snapindex ed475a930..5b3b74eeb 100644--- a/tests/snapshots/integration__integration_tests__help__help_step_long.snap+++ b/tests/snapshots/integration__integration_tests__help__help_step_long.snap@@ -25,7 +25,7 @@ Usage: [1m[36mwt step[0m [36m[OPTIONS][0m [36m<COMMAND>[1m[32mCommands:[1m[36mcommit[0m Commit changes with LLM commit message- [1m[36msquash[0m Squash commits since target+ [1m[36msquash[0m Squash commits since branching[1m[36mpush[0m Fast-forward target to current branch[1m[36mrebase[0m Rebase onto target[1m[36mfor-each[0m [experimental] Run command in each worktreediff --git a/tests/snapshots/integration__integration_tests__help__help_step_short.snap b/tests/snapshots/integration__integration_tests__help__help_step_short.snapindex 3e6a03969..01201dd18 100644--- a/tests/snapshots/integration__integration_tests__help__help_step_short.snap+++ b/tests/snapshots/integration__integration_tests__help__help_step_short.snap@@ -25,7 +25,7 @@ Usage: [1m[36mwt step[0m [36m[OPTIONS][0m [36m<COMMAND>[1m[32mCommands:[1m[36mcommit[0m Commit changes with LLM commit message- [1m[36msquash[0m Squash commits since target+ [1m[36msquash[0m Squash commits since branching[1m[36mpush[0m Fast-forward target to current branch[1m[36mrebase[0m Rebase onto target[1m[36mfor-each[0m [experimental] Run command in each worktree