Skip to content

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

docs: clean up switch command help text (#1782)

worktrunk-bote14e80c0ceec
diff --git a/docs/content/switch.md b/docs/content/switch.md
index 18cb6b5c5..e29c99596 100644
--- a/docs/content/switch.md
+++ b/docs/content/switch.md
@@ -36,14 +36,12 @@ The `--create` flag creates a new branch from `--base` — the default branch un
## Creating worktrees
-If the branch already has a worktree, `wt switch` changes directories to it. Otherwise, it creates one, running [hooks](@/hook.md).
+If the branch already has a worktree, `wt switch` changes directories to it. Otherwise, it creates one:
-When creating a worktree, worktrunk:
-
-1. Runs [pre-switch hooks](@/hook.md#pre-switch) — blocks until complete
+1. Runs [pre-switch hooks](@/hook.md#pre-switch), blocking until complete
2. Creates worktree at configured path
3. Switches to new directory
-4. Runs [pre-start hooks](@/hook.md#pre-start) — blocks until complete
+4. Runs [pre-start hooks](@/hook.md#pre-start), blocking until complete
5. Spawns [post-start](@/hook.md#post-start) and [post-switch hooks](@/hook.md#post-switch) in the background
```bash
@@ -73,7 +71,7 @@ wt switch mr:101 # MR !101's branch
## Interactive picker
-When called without arguments, `wt switch` opens an interactive picker to browse and select worktrees with live preview. The picker requires a TTY.
+When called without arguments, `wt switch` opens an interactive picker to browse and select worktrees with live preview.
<figure class="demo">
<picture>
@@ -89,7 +87,7 @@ When called without arguments, `wt switch` opens an interactive picker to browse
| `↑`/`↓` | Navigate worktree list |
| (type) | Filter worktrees |
| `Enter` | Switch to selected worktree |
-| `Alt-c` | Create new worktree from query |
+| `Alt-c` | Create new worktree named as entered text |
| `Esc` | Cancel |
| `1`–`5` | Switch preview tab |
| `Alt-p` | Toggle preview panel |
diff --git a/skills/worktrunk/reference/switch.md b/skills/worktrunk/reference/switch.md
index 55d95a32f..459a04bfb 100644
--- a/skills/worktrunk/reference/switch.md
+++ b/skills/worktrunk/reference/switch.md
@@ -20,14 +20,12 @@ The `--create` flag creates a new branch from `--base` — the default branch un
## Creating worktrees
-If the branch already has a worktree, `wt switch` changes directories to it. Otherwise, it creates one, running [hooks](https://worktrunk.dev/hook/).
+If the branch already has a worktree, `wt switch` changes directories to it. Otherwise, it creates one:
-When creating a worktree, worktrunk:
-
-1. Runs [pre-switch hooks](https://worktrunk.dev/hook/#pre-switch) — blocks until complete
+1. Runs [pre-switch hooks](https://worktrunk.dev/hook/#pre-switch), blocking until complete
2. Creates worktree at configured path
3. Switches to new directory
-4. Runs [pre-start hooks](https://worktrunk.dev/hook/#pre-start) — blocks until complete
+4. Runs [pre-start hooks](https://worktrunk.dev/hook/#pre-start), blocking until complete
5. Spawns [post-start](https://worktrunk.dev/hook/#post-start) and [post-switch hooks](https://worktrunk.dev/hook/#post-switch) in the background
```bash
@@ -57,7 +55,7 @@ wt switch mr:101 # MR !101's branch
## Interactive picker
-When called without arguments, `wt switch` opens an interactive picker to browse and select worktrees with live preview. The picker requires a TTY.
+When called without arguments, `wt switch` opens an interactive picker to browse and select worktrees with live preview.
**Keybindings:**
@@ -66,7 +64,7 @@ When called without arguments, `wt switch` opens an interactive picker to browse
| `↑`/`↓` | Navigate worktree list |
| (type) | Filter worktrees |
| `Enter` | Switch to selected worktree |
-| `Alt-c` | Create new worktree from query |
+| `Alt-c` | Create new worktree named as entered text |
| `Esc` | Cancel |
| `1`–`5` | Switch preview tab |
| `Alt-p` | Toggle preview panel |
diff --git a/src/cli/mod.rs b/src/cli/mod.rs
index 1000dd297..cafb683e2 100644
--- a/src/cli/mod.rs
+++ b/src/cli/mod.rs
@@ -268,14 +268,12 @@ The `--create` flag creates a new branch from `--base` — the default branch un
## Creating worktrees
-If the branch already has a worktree, `wt switch` changes directories to it. Otherwise, it creates one, running [hooks](@/hook.md).
+If the branch already has a worktree, `wt switch` changes directories to it. Otherwise, it creates one:
-When creating a worktree, worktrunk:
-
-1. Runs [pre-switch hooks](@/hook.md#pre-switch) — blocks until complete
+1. Runs [pre-switch hooks](@/hook.md#pre-switch), blocking until complete
2. Creates worktree at configured path
3. Switches to new directory
-4. Runs [pre-start hooks](@/hook.md#pre-start) — blocks until complete
+4. Runs [pre-start hooks](@/hook.md#pre-start), blocking until complete
5. Spawns [post-start](@/hook.md#post-start) and [post-switch hooks](@/hook.md#post-switch) in the background
```console
@@ -305,7 +303,7 @@ wt switch mr:101 # MR !101's branch
## Interactive picker
-When called without arguments, `wt switch` opens an interactive picker to browse and select worktrees with live preview. The picker requires a TTY.
+When called without arguments, `wt switch` opens an interactive picker to browse and select worktrees with live preview.
<!-- demo: wt-switch-picker.gif 1600x800 -->
**Keybindings:**
@@ -315,7 +313,7 @@ When called without arguments, `wt switch` opens an interactive picker to browse
| `↑`/`↓` | Navigate worktree list |
| (type) | Filter worktrees |
| `Enter` | Switch to selected worktree |
-| `Alt-c` | Create new worktree from query |
+| `Alt-c` | Create new worktree named as entered text |
| `Esc` | Cancel |
| `1`–`5` | Switch preview tab |
| `Alt-p` | Toggle preview panel |
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 c7f70d6e5..d7b162269 100644
--- a/tests/snapshots/integration__integration_tests__help__help_switch_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_switch_long.snap
@@ -124,14 +124,12 @@ The --create flag creates a new branch from --base — the defau
Creating worktrees
-If the branch already has a worktree, wt switch changes directories to it. Otherwise, it creates one, running hooks.
+If the branch already has a worktree, wt switch changes directories to it. Otherwise, it creates one:
-When creating a worktree, worktrunk:
-
-1. Runs pre-switch hooks — blocks until complete
+1. Runs pre-switch hooks, blocking until complete
2. Creates worktree at configured path
3. Switches to new directory
-4. Runs pre-start hooks — blocks until complete
+4. Runs pre-start hooks, blocking until complete
5. Spawns post-start and post-switch hooks in the background
  wt switch feature # Existing branch → creates worktree
@@ -157,20 +155,20 @@ When creating a worktree, worktrunk:
Interactive picker
-When called without arguments, wt switch opens an interactive picker to browse and select worktrees with live preview. The picker requires a TTY.
+When called without arguments, wt switch opens an interactive picker to browse and select worktrees with live preview.
Keybindings:
- Key Action
- ───────────── ──────────────────────────────
- ↑/↓ Navigate worktree list
- (type) Filter worktrees
- Enter Switch to selected worktree
- Alt-c Create new worktree from query
- Esc Cancel
- 1–5 Switch preview tab
- Alt-p Toggle preview panel
- Ctrl-u/Ctrl-d Scroll preview up/down
+ Key Action
+ ───────────── ─────────────────────────────────────────
+ ↑/↓ Navigate worktree list
+ (type) Filter worktrees
+ Enter Switch to selected worktree
+ Alt-c Create new worktree named as entered text
+ Esc Cancel
+ 1–5 Switch preview tab
+ Alt-p Toggle preview panel
+ Ctrl-u/Ctrl-d Scroll preview up/down
Preview tabs — toggle with number keys: