Skip to content

feat(branch): interactive base/head picker with -i - #38

Draft
imfing wants to merge 1 commit into
mainfrom
feat/branch-interactive-picker
Draft

imfing wants to merge 1 commit into
mainfrom
feat/branch-interactive-picker

Conversation

@imfing

@imfing imfing commented Oct 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds diffs branch -i / --interactive: a fuzzy-filterable picker over local and remote-tracking branches (type to filter, Enter to select).
  • Without a base, the picker chooses the base: the checked-out branch is left out and the inferred base (PR base, default branch, or main/master) is preselected.
  • With a base (diffs branch main -i), the picker chooses the head instead, with the checked-out branch preselected. -i conflicts with an explicit head.
  • Esc, q, or Ctrl-C exit 1 without output; a non-terminal stdin/stderr fails with a hint to pass the base explicitly.
  • Picker colors follow the existing NO_COLOR/TERM=dumb handling.

Uses dialoguer (fuzzy-select feature only) and console for the terminal UI. Help text and README updated.

Test plan

  • cargo clippy --all-targets -- -D warnings, cargo test (new picker_list unit test)
  • Drove the picker through a pty: filtering rele + Enter started the server with base=release/1.0; Esc exited 1 quietly; diffs branch main -i with hot + Enter started with head=hotfix
  • diffs branch -i </dev/null fails with the terminal hint; diffs branch main feature -i is rejected by clap

🤖 Generated with Claude Code

Adds `diffs branch -i`, a fuzzy-filterable picker (dialoguer FuzzySelect)
over local and remote-tracking branches. Without a base it picks the base,
leaving out the checked-out branch and preselecting the inferred base; with
a base it picks the head instead. Esc/q/Ctrl-C exit 1 quietly, and a
non-terminal stdin/stderr fails with a hint to pass the base explicitly.

Co-Authored-By: Claude <noreply@anthropic.com>
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.

1 participant