Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
fix: hide alt-r remove from picker legend and docs (#1696)
Maximilian Roos85a58fa62a90
diff --git a/docs/content/switch.md b/docs/content/switch.mdindex 47df0dd25..a3dfb379f 100644--- a/docs/content/switch.md+++ b/docs/content/switch.md@@ -91,7 +91,6 @@ When called without arguments, `wt switch` opens an interactive picker to browse| (type) | Filter worktrees || `Enter` | Switch to selected worktree || `Alt-c` | Create new worktree from query |-| `Alt-r` | Remove selected worktree || `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.mdindex 4105050d3..e4b32f505 100644--- a/skills/worktrunk/reference/switch.md+++ b/skills/worktrunk/reference/switch.md@@ -68,7 +68,6 @@ When called without arguments, `wt switch` opens an interactive picker to browse| (type) | Filter worktrees || `Enter` | Switch to selected worktree || `Alt-c` | Create new worktree from query |-| `Alt-r` | Remove selected worktree || `Esc` | Cancel || `1`–`5` | Switch preview tab || `Alt-p` | Toggle preview panel |diff --git a/src/cli/mod.rs b/src/cli/mod.rsindex 98526b276..625f37ce1 100644--- a/src/cli/mod.rs+++ b/src/cli/mod.rs@@ -317,7 +317,6 @@ When called without arguments, `wt switch` opens an interactive picker to browse| (type) | Filter worktrees || `Enter` | Switch to selected worktree || `Alt-c` | Create new worktree from query |-| `Alt-r` | Remove selected worktree || `Esc` | Cancel || `1`–`5` | Switch preview tab || `Alt-p` | Toggle preview panel |diff --git a/src/commands/picker/items.rs b/src/commands/picker/items.rsindex 202866b40..51702e5e0 100644--- a/src/commands/picker/items.rs+++ b/src/commands/picker/items.rs@@ -145,7 +145,7 @@ impl WorktreeSkimItem {// Controls use dim yellow to distinguish from dimmed (white) tabslet controls = cformat!(- "<dim,yellow>Enter: switch | alt-c: create | alt-r: remove | Esc: cancel | ctrl-u/d: scroll | alt-p: toggle</>"+ "<dim,yellow>Enter: switch | alt-c: create | Esc: cancel | ctrl-u/d: scroll | alt-p: toggle</>");// End each tab and controls with full reset to prevent style bleedingdiff --git a/src/commands/picker/snapshots/wt__commands__picker__items__tests__branch_diff.snap b/src/commands/picker/snapshots/wt__commands__picker__items__tests__branch_diff.snapindex 2efee5351..08516cc6e 100644--- a/src/commands/picker/snapshots/wt__commands__picker__items__tests__branch_diff.snap+++ b/src/commands/picker/snapshots/wt__commands__picker__items__tests__branch_diff.snap@@ -3,4 +3,4 @@ source: src/commands/picker/items.rsexpression: "WorktreeSkimItem::render_preview_tabs(mode)"---[2m1: HEAD±[22m[0m | [2m2: log[22m[0m | [1m3: main…±[22m[0m | [2m4: remote⇅[22m[0m | [2m5: summary[22m[0m-[33m[2mEnter: switch | alt-c: create | alt-r: remove | Esc: cancel | ctrl-u/d: scroll | alt-p: toggle[39m[22m[0m+[33m[2mEnter: switch | alt-c: create | Esc: cancel | ctrl-u/d: scroll | alt-p: toggle[39m[22m[0mdiff --git a/src/commands/picker/snapshots/wt__commands__picker__items__tests__log.snap b/src/commands/picker/snapshots/wt__commands__picker__items__tests__log.snapindex fa7d5c91c..1969016c2 100644--- a/src/commands/picker/snapshots/wt__commands__picker__items__tests__log.snap+++ b/src/commands/picker/snapshots/wt__commands__picker__items__tests__log.snap@@ -3,4 +3,4 @@ source: src/commands/picker/items.rsexpression: "WorktreeSkimItem::render_preview_tabs(mode)"---[2m1: HEAD±[22m[0m | [1m2: log[22m[0m | [2m3: main…±[22m[0m | [2m4: remote⇅[22m[0m | [2m5: summary[22m[0m-[33m[2mEnter: switch | alt-c: create | alt-r: remove | Esc: cancel | ctrl-u/d: scroll | alt-p: toggle[39m[22m[0m+[33m[2mEnter: switch | alt-c: create | Esc: cancel | ctrl-u/d: scroll | alt-p: toggle[39m[22m[0mdiff --git a/src/commands/picker/snapshots/wt__commands__picker__items__tests__summary.snap b/src/commands/picker/snapshots/wt__commands__picker__items__tests__summary.snapindex d3ff91ef6..2886afc3e 100644--- a/src/commands/picker/snapshots/wt__commands__picker__items__tests__summary.snap+++ b/src/commands/picker/snapshots/wt__commands__picker__items__tests__summary.snap@@ -3,4 +3,4 @@ source: src/commands/picker/items.rsexpression: "WorktreeSkimItem::render_preview_tabs(mode)"---[2m1: HEAD±[22m[0m | [2m2: log[22m[0m | [2m3: main…±[22m[0m | [2m4: remote⇅[22m[0m | [1m5: summary[22m[0m-[33m[2mEnter: switch | alt-c: create | alt-r: remove | Esc: cancel | ctrl-u/d: scroll | alt-p: toggle[39m[22m[0m+[33m[2mEnter: switch | alt-c: create | Esc: cancel | ctrl-u/d: scroll | alt-p: toggle[39m[22m[0mdiff --git a/src/commands/picker/snapshots/wt__commands__picker__items__tests__upstream_diff.snap b/src/commands/picker/snapshots/wt__commands__picker__items__tests__upstream_diff.snapindex 1663500df..65e2d02ce 100644--- a/src/commands/picker/snapshots/wt__commands__picker__items__tests__upstream_diff.snap+++ b/src/commands/picker/snapshots/wt__commands__picker__items__tests__upstream_diff.snap@@ -3,4 +3,4 @@ source: src/commands/picker/items.rsexpression: "WorktreeSkimItem::render_preview_tabs(mode)"---[2m1: HEAD±[22m[0m | [2m2: log[22m[0m | [2m3: main…±[22m[0m | [1m4: remote⇅[22m[0m | [2m5: summary[22m[0m-[33m[2mEnter: switch | alt-c: create | alt-r: remove | Esc: cancel | ctrl-u/d: scroll | alt-p: toggle[39m[22m[0m+[33m[2mEnter: switch | alt-c: create | Esc: cancel | ctrl-u/d: scroll | alt-p: toggle[39m[22m[0mdiff --git a/src/commands/picker/snapshots/wt__commands__picker__items__tests__working_tree.snap b/src/commands/picker/snapshots/wt__commands__picker__items__tests__working_tree.snapindex 9f10a7053..bbb91ec49 100644--- a/src/commands/picker/snapshots/wt__commands__picker__items__tests__working_tree.snap+++ b/src/commands/picker/snapshots/wt__commands__picker__items__tests__working_tree.snap@@ -3,4 +3,4 @@ source: src/commands/picker/items.rsexpression: "WorktreeSkimItem::render_preview_tabs(mode)"---[1m1: HEAD±[22m[0m | [2m2: log[22m[0m | [2m3: main…±[22m[0m | [2m4: remote⇅[22m[0m | [2m5: summary[22m[0m-[33m[2mEnter: switch | alt-c: create | alt-r: remove | Esc: cancel | ctrl-u/d: scroll | alt-p: toggle[39m[22m[0m+[33m[2mEnter: switch | alt-c: create | Esc: cancel | ctrl-u/d: scroll | alt-p: toggle[39m[22m[0mdiff --git a/tests/snapshots/integration__integration_tests__help__help_switch_long.snap b/tests/snapshots/integration__integration_tests__help__help_switch_long.snapindex e029b5d82..71aeaa517 100644--- a/tests/snapshots/integration__integration_tests__help__help_switch_long.snap+++ b/tests/snapshots/integration__integration_tests__help__help_switch_long.snap@@ -168,7 +168,6 @@ When called without arguments, [2mwt switch[0m opens an interactive picker to(type) Filter worktrees[2mEnter[0m Switch to selected worktree[2mAlt-c[0m Create new worktree from query- [2mAlt-r[0m Remove selected worktree[2mEsc[0m Cancel[2m1[0m–[2m5[0m Switch preview tab[2mAlt-p[0m Toggle preview paneldiff --git a/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_abort_escape_preview.snap b/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_abort_escape_preview.snapindex 0b4ece9e5..70b578f57 100644--- a/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_abort_escape_preview.snap+++ b/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_abort_escape_preview.snap@@ -3,6 +3,6 @@ source: tests/integration_tests/switch_picker.rsexpression: preview---1: HEAD± | 2: log | 3: main…± | 4: remote⇅ | 5: summary [N/M]-Enter: switch | alt-c: create | alt-r: remove | Esc: cancel+Enter: switch | alt-c: create | Esc: cancel | ctrl-u/d: scr○ main has no uncommitted changesdiff --git a/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_multiple_worktrees_preview.snap b/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_multiple_worktrees_preview.snapindex 0b4ece9e5..70b578f57 100644--- a/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_multiple_worktrees_preview.snap+++ b/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_multiple_worktrees_preview.snap@@ -3,6 +3,6 @@ source: tests/integration_tests/switch_picker.rsexpression: preview---1: HEAD± | 2: log | 3: main…± | 4: remote⇅ | 5: summary [N/M]-Enter: switch | alt-c: create | alt-r: remove | Esc: cancel+Enter: switch | alt-c: create | Esc: cancel | ctrl-u/d: scr○ main has no uncommitted changesdiff --git a/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_preview_log_preview.snap b/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_preview_log_preview.snapindex 7e06b9e37..a11a5eaca 100644--- a/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_preview_log_preview.snap+++ b/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_preview_log_preview.snap@@ -3,7 +3,7 @@ source: tests/integration_tests/switch_picker.rsexpression: preview---1: HEAD± | 2: log | 3: main…± | 4: remote⇅ | 5: summary [N/M]-Enter: switch | alt-c: create | alt-r: remove | Esc: cancel+Enter: switch | alt-c: create | Esc: cancel | ctrl-u/d: scr* [HASH] +1 [TIME] (feature) Add file 5 with content* [HASH] +1 [TIME] Add file 4 with contentdiff --git a/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_preview_main_diff_preview.snap b/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_preview_main_diff_preview.snapindex c2a59d666..494330b69 100644--- a/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_preview_main_diff_preview.snap+++ b/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_preview_main_diff_preview.snap@@ -3,7 +3,7 @@ source: tests/integration_tests/switch_picker.rsexpression: preview---1: HEAD± | 2: log | 3: main…± | 4: remote⇅ | 5: summary [N/M]-Enter: switch | alt-c: create | alt-r: remove | Esc: cancel+Enter: switch | alt-c: create | Esc: cancel | ctrl-u/d: scrfeature_code.rs | 6 ++++++tests.rs | 4 ++++diff --git a/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_preview_summary_preview.snap b/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_preview_summary_preview.snapindex 08eabcc76..3d208e81f 100644--- a/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_preview_summary_preview.snap+++ b/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_preview_summary_preview.snap@@ -3,7 +3,7 @@ source: tests/integration_tests/switch_picker.rsexpression: preview---1: HEAD± | 2: log | 3: main…± | 4: remote⇅ | 5: summary [N/M]-Enter: switch | alt-c: create | alt-r: remove | Esc: cancel+Enter: switch | alt-c: create | Esc: cancel | ctrl-u/d: scrConfigure [commit.generation] command to enable LLM summaridiff --git a/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_preview_uncommitted_preview.snap b/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_preview_uncommitted_preview.snapindex f9f0539ed..6807cadde 100644--- a/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_preview_uncommitted_preview.snap+++ b/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_preview_uncommitted_preview.snap@@ -3,7 +3,7 @@ source: tests/integration_tests/switch_picker.rsexpression: preview---1: HEAD± | 2: log | 3: main…± | 4: remote⇅ | 5: summary [N/M]-Enter: switch | alt-c: create | alt-r: remove | Esc: cancel+Enter: switch | alt-c: create | Esc: cancel | ctrl-u/d: scrtracked.txt | 4 +++-1 file changed, 3 insertions(+), 1 deletion(-)diff --git a/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_with_branches_preview.snap b/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_with_branches_preview.snapindex 0b4ece9e5..70b578f57 100644--- a/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_with_branches_preview.snap+++ b/tests/snapshots/integration__integration_tests__switch_picker__switch_picker_with_branches_preview.snap@@ -3,6 +3,6 @@ source: tests/integration_tests/switch_picker.rsexpression: preview---1: HEAD± | 2: log | 3: main…± | 4: remote⇅ | 5: summary [N/M]-Enter: switch | alt-c: create | alt-r: remove | Esc: cancel+Enter: switch | alt-c: create | Esc: cancel | ctrl-u/d: scr○ main has no uncommitted changes