You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+25-8Lines changed: 25 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,7 +67,7 @@ worktree. No more terminal tab confusion.
67
67
- Linux (x86_64 or ARM64)
68
68
- macOS (Apple Silicon M1/M2/M3)
69
69
- One of the following shells (for completion support):
70
-
- Bash
70
+
- Bash (4+/5.x) with bash-completion v2
71
71
- Zsh
72
72
- Fish
73
73
@@ -252,13 +252,18 @@ or any other worktree).
252
252
253
253
#### If installed via Homebrew
254
254
255
-
No manual setup required. Homebrew installs a tiny bootstrapper that runs `wtp shell-init <shell>` the first time you press `TAB` after typing `wtp`. That lazy call gives you both tab completion and the `wtp cd` integration for the rest of the session—no rc edits needed.
255
+
No manual setup required. Homebrew installs a tiny bootstrapper that runs
256
+
`wtp shell-init <shell>`the first time you press `TAB` after typing `wtp`. That
257
+
lazy call gives you both tab completion and the `wtp cd` integration for the
258
+
rest of the session—no rc edits needed.
256
259
257
-
Need to refresh inside an existing shell? Just run `wtp shell-init <shell>` yourself.
260
+
Need to refresh inside an existing shell? Just run `wtp shell-init <shell>`
261
+
yourself.
258
262
259
263
#### If installed via go install
260
264
261
-
Add a single line to your shell configuration file to enable both completion and shell integration:
265
+
Add a single line to your shell configuration file to enable both completion and
> **Note:** Bash completion requires bash-completion v2. On macOS, install
280
+
> Homebrew’s Bash 5.x and `bash-completion@2`, then
281
+
> `source /opt/homebrew/etc/profile.d/bash_completion.sh` (or the path shown
282
+
> after installation) before enabling the one-liner above.
283
+
274
284
After reloading your shell you get the same experience as Homebrew users.
275
285
276
286
### Navigation with wtp cd
277
287
278
-
The `wtp cd` command outputs the absolute path to a worktree. You can use it in two ways:
288
+
The `wtp cd` command outputs the absolute path to a worktree. You can use it in
289
+
two ways:
279
290
280
291
#### Direct Usage
292
+
281
293
```bash
282
294
# Change to a worktree using command substitution
283
295
cd "$(wtp cd feature/auth)"
@@ -288,8 +300,10 @@ cd "$(wtp cd @)"
288
300
289
301
#### With Shell Hook (Recommended)
290
302
291
-
For a more seamless experience, enable the shell hook. `wtp shell-init <shell>` already bundles it, so Homebrew users get the hook automatically and go install users get it from the one-liner above. If you only want the hook without completions, you can still run `wtp hook <shell>` manually.
292
-
303
+
For a more seamless experience, enable the shell hook. `wtp shell-init <shell>`
304
+
already bundles it, so Homebrew users get the hook automatically and go install
305
+
users get it from the one-liner above. If you only want the hook without
306
+
completions, you can still run `wtp hook <shell>` manually.
293
307
294
308
Then use the simplified syntax:
295
309
@@ -306,7 +320,9 @@ wtp cd <TAB>
306
320
307
321
#### Complete Setup (Lazy Loading for Homebrew Users)
308
322
309
-
Homebrew ships a lightweight bootstrapper. Press `TAB` after typing `wtp` and it evaluates `wtp shell-init <shell>` once for your session—tab completion and `wtp cd` just work.
323
+
Homebrew ships a lightweight bootstrapper. Press `TAB` after typing `wtp` and it
324
+
evaluates `wtp shell-init <shell>` once for your session—tab completion and
325
+
`wtp cd`just work.
310
326
311
327
## Worktree Structure
312
328
@@ -372,6 +388,7 @@ go tool task build
372
388
# Run locally
373
389
./wtp --help
374
390
```
391
+
375
392
## License
376
393
377
394
MIT License - see [LICENSE](LICENSE) file for details.
0 commit comments