Commit c3513cc
feat: auto-navigate to main when removing current worktree
When you remove a worktree you're currently in, automatically
navigate to the main worktree instead of leaving the shell in a
deleted directory.
The command now:
1. Detects if current directory is in the worktree being removed
2. Finds the main worktree path (first entry in git worktree list)
3. After successful removal, prints TREE_ME_CD marker to navigate
This prevents the confusing situation where your shell is left
"in" a non-existent directory after removing the worktree you're in.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 73858a7 commit c3513cc
1 file changed
+27
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
370 | 370 | | |
371 | 371 | | |
372 | 372 | | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
373 | 394 | | |
374 | 395 | | |
375 | 396 | | |
| |||
378 | 399 | | |
379 | 400 | | |
380 | 401 | | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
381 | 408 | | |
382 | 409 | | |
383 | 410 | | |
| |||
0 commit comments