Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
Consolidate path-first lookup docs to reference switch section
Maximilian Roos30e6db5a0135
diff --git a/README.md b/README.mdindex 28540d5da..21fac520d 100644--- a/README.md+++ b/README.md@@ -756,7 +756,7 @@ Force-delete an unmerged branch:wt remove -D experimental```-### When Branches Are Deleted+### Branch CleanupBranches delete automatically when their content is already in the target branch (typically main). This works with squash-merge and rebase workflows where commit history differs but file changes match.@@ -766,17 +766,7 @@ Use `-D` to force-delete unmerged branches. Use `--no-delete-branch` to keep theRemoval runs in the background by default (returns immediately). Logs are written to `.git/wt-logs/{branch}-remove.log`. Use `--no-background` to run in the foreground.-### Path-First Lookup--Arguments resolve by checking the expected path first, then falling back to branch name:--1. Compute expected path from argument (using configured path template)-2. If a worktree exists there, remove it (regardless of branch name)-3. Otherwise, treat argument as a branch name--If `repo.foo/` exists on branch `bar`, both `wt remove foo` and `wt remove bar` remove the same worktree.--**Shortcuts**: `@` (current), `-` (previous), `^` (main worktree)+Arguments resolve by path first, then branch name—see [wt switch](@/switch.md#path-first-lookup). Shortcuts: `@` (current), `-` (previous), `^` (main worktree).### See Alsodiff --git a/docs/content/remove.md b/docs/content/remove.mdindex f5aaa0377..fba963cf0 100644--- a/docs/content/remove.md+++ b/docs/content/remove.md@@ -37,7 +37,7 @@ Force-delete an unmerged branch:wt remove -D experimental```-## When Branches Are Deleted+## Branch CleanupBranches delete automatically when their content is already in the target branch (typically main). This works with squash-merge and rebase workflows where commit history differs but file changes match.@@ -47,17 +47,7 @@ Use `-D` to force-delete unmerged branches. Use `--no-delete-branch` to keep theRemoval runs in the background by default (returns immediately). Logs are written to `.git/wt-logs/{branch}-remove.log`. Use `--no-background` to run in the foreground.-## Path-First Lookup--Arguments resolve by checking the expected path first, then falling back to branch name:--1. Compute expected path from argument (using configured path template)-2. If a worktree exists there, remove it (regardless of branch name)-3. Otherwise, treat argument as a branch name--If `repo.foo/` exists on branch `bar`, both `wt remove foo` and `wt remove bar` remove the same worktree.--**Shortcuts**: `@` (current), `-` (previous), `^` (main worktree)+Arguments resolve by path first, then branch name—see [wt switch](@/switch.md#path-first-lookup). Shortcuts: `@` (current), `-` (previous), `^` (main worktree).## See Alsodiff --git a/src/cli.rs b/src/cli.rsindex 7fe324a76..2130ddc2b 100644--- a/src/cli.rs+++ b/src/cli.rs@@ -1103,7 +1103,7 @@ Force-delete an unmerged branch:wt remove -D experimental```-## When Branches Are Deleted+## Branch CleanupBranches delete automatically when their content is already in the target branch (typically main). This works with squash-merge and rebase workflows where commit history differs but file changes match.@@ -1113,17 +1113,7 @@ Use `-D` to force-delete unmerged branches. Use `--no-delete-branch` to keep theRemoval runs in the background by default (returns immediately). Logs are written to `.git/wt-logs/{branch}-remove.log`. Use `--no-background` to run in the foreground.-## Path-First Lookup--Arguments resolve by checking the expected path first, then falling back to branch name:--1. Compute expected path from argument (using configured path template)-2. If a worktree exists there, remove it (regardless of branch name)-3. Otherwise, treat argument as a branch name--If `repo.foo/` exists on branch `bar`, both `wt remove foo` and `wt remove bar` remove the same worktree.--**Shortcuts**: `@` (current), `-` (previous), `^` (main worktree)+Arguments resolve by path first, then branch name—see [wt switch](@/switch.md#path-first-lookup). Shortcuts: `@` (current), `-` (previous), `^` (main worktree).## See Alsodiff --git a/tests/snapshots/integration__integration_tests__help__help_remove_long.snap b/tests/snapshots/integration__integration_tests__help__help_remove_long.snapindex 01dafca66..db31576a6 100644--- a/tests/snapshots/integration__integration_tests__help__help_remove_long.snap+++ b/tests/snapshots/integration__integration_tests__help__help_remove_long.snap@@ -68,7 +68,7 @@ Force-delete an unmerged branch:[2mwt remove -D experimental[0m-[32mWhen Branches Are Deleted[0m+[32mBranch Cleanup[0mBranches delete automatically when their content is already in the target branch (typically main). This works with squash-merge and rebase workflows where commit history differs but file changes match.@@ -78,17 +78,7 @@ Use [2m-D[0m to force-delete unmerged branches. Use [2m--no-delete-branch[0mRemoval runs in the background by default (returns immediately). Logs are written to [2m.git/wt-logs/{branch}-remove.log[0m. Use [2m--no-background[0m to run in the foreground.-[32mPath-First Lookup[0m--Arguments resolve by checking the expected path first, then falling back to branch name:--1. Compute expected path from argument (using configured path template)-2. If a worktree exists there, remove it (regardless of branch name)-3. Otherwise, treat argument as a branch name--If [2mrepo.foo/[0m exists on branch [2mbar[0m, both [2mwt remove foo[0m and [2mwt remove bar[0m remove the same worktree.--[1mShortcuts[0m: [2m@[0m (current), [2m-[0m (previous), [2m^[0m (main worktree)+Arguments resolve by path first, then branch name—see wt switch. Shortcuts: [2m@[0m (current), [2m-[0m (previous), [2m^[0m (main worktree).[32mSee Also[0m