Problem
When the target branch is in a different worktree and the shell wrapper isn't active, ez switch prints "Switching to ..." but doesn't actually change the working directory. This is misleading.
Current behavior
ez switch feat/x where feat/x is in a worktree
- Prints "Switching to feat/x" and a path
- User's shell stays in the original directory
- No indication that the switch didn't actually happen
Implemented fix (PR-C: feat/worktree-ops)
- Detects when shell wrapper isn't active
- Prints clear error message with manual
cd instructions
- Exits with code 5 (usage error)
- Added
--no-cd-required flag for scripts/agents that handle cd themselves (exits 0, prints path)
✗ Could not switch to `feat/x` — branch is checked out in a different worktree.
Shell integration is not active (run `ez setup` to enable auto-cd).
To switch manually, run:
cd /path/to/.worktrees/feat-x
Related
Problem
When the target branch is in a different worktree and the shell wrapper isn't active,
ez switchprints "Switching to ..." but doesn't actually change the working directory. This is misleading.Current behavior
ez switch feat/xwhere feat/x is in a worktreeImplemented fix (PR-C:
feat/worktree-ops)cdinstructions--no-cd-requiredflag for scripts/agents that handle cd themselves (exits 0, prints path)Related