Skip to content

feat(open): add --headless flag to skip opening editor/terminal#85

Merged
tupe12334 merged 1 commit into
mainfrom
issue-53
Apr 4, 2026
Merged

feat(open): add --headless flag to skip opening editor/terminal#85
tupe12334 merged 1 commit into
mainfrom
issue-53

Conversation

@tupe12334
Copy link
Copy Markdown
Contributor

Summary

  • Adds --headless flag to worktree open that skips opening the editor/terminal
  • Pre/post hooks still run normally in headless mode
  • Useful for programmatic invocation (queue-based worker pools, daemons) where only the exit code matters

Implementation

  • Extracted editor/post-hook dispatch to hook_ctx::launch_editor to stay within the 100-line file limit
  • Uses early return for the headless path to keep control flow clear

Test plan

  • cargo test passes (232 tests)
  • 100% line coverage maintained
  • worktree open --headless --help shows the new flag with description

Closes #53

🤖 Generated with Claude Code

Adds a --headless flag to the `worktree open` command that skips
opening the editor or terminal while still running pre/post hooks.
Useful for programmatic invocation (e.g. queue-based worker pools)
where only the exit code matters. Closes #53.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@tupe12334 tupe12334 merged commit 150cc6c into main Apr 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants