Commit a6f7f9a
feat: add custom commands for tree view context menu (#19)
## Summary
- Add two new settings (`customCommands.directory`,
`customCommands.workspace`) for configuring external commands triggered
from the tree view context menu
- Each command supports template variables (`{name}`, `{branch}`,
`{ref}`, `{head}`, `{path}`, `{dir}`, `{worktree}`) and optional
environment variables
- Commands shown via QuickPick, spawned as fire-and-forget child
processes
- Add `{dir}` template variable for workspace items (parent directory of
workspace file)
- Add spec, update README, docs, and commands spec
## Test plan
- [x] Right-click worktree/repository → "Custom Commands..." appears in
context menu
- [x] Right-click workspace file → "Custom Commands..." appears (with
workspace commands configured)
- [x] QuickPick shows configured commands with rendered command preview
- [x] External editor (Zed) opens correctly for both directory and
workspace items
- [x] macOS GUI terminal (Ghostty via `open -a`) opens at correct
directory
- [x] Menu item hidden when no custom commands configured
- [x] Menu item hidden on prunable items
- [x] Invalid config entries skipped with log warning
- [x] 89 tests passing, lint clean, build clean
Closes #17
Related: #18 (VS Code integrated terminal mode — future enhancement)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 5d3f559 commit a6f7f9a
File tree
18 files changed
+1267
-13
lines changed- .changeset
- docs
- plans
- spec
- src
- commands
- utils
- __tests__
18 files changed
+1267
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
168 | 171 | | |
169 | 172 | | |
170 | 173 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
| 66 | + | |
65 | 67 | | |
66 | 68 | | |
67 | 69 | | |
| |||
113 | 115 | | |
114 | 116 | | |
115 | 117 | | |
| 118 | + | |
| 119 | + | |
116 | 120 | | |
117 | 121 | | |
118 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
119 | 147 | | |
120 | 148 | | |
121 | 149 | | |
| |||
145 | 173 | | |
146 | 174 | | |
147 | 175 | | |
| 176 | + | |
148 | 177 | | |
149 | 178 | | |
150 | 179 | | |
| |||
168 | 197 | | |
169 | 198 | | |
170 | 199 | | |
| 200 | + | |
171 | 201 | | |
172 | 202 | | |
173 | 203 | | |
| |||
0 commit comments