Skip to content

feat(completion): complete remote-qualified switch branches - #4613

Merged
max-sixty merged 3 commits into
mainfrom
feat/issue-4612
Oct 27, 2026
Merged

max-sixty merged 3 commits into
mainfrom
feat/issue-4612

Conversation

@worktrunk-bot

Copy link
Copy Markdown
Collaborator

Typing a remote prefix in wt switch now completes qualified remote-tracking branch names, including in repositories where the general completion list omits remote branches after the 100-candidate cutoff. Local branches literally named origin/... remain available. The existing unqualified completion behavior is unchanged.

The fish completion regression test failed before the change and now passes. Verified the 19 targeted switch completion tests, help snapshots, documentation sync, and docs build.

Closes #4612 — automated triage

@worktrunk-bot worktrunk-bot left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When a local remote/branch-0 and a remote origin/remote/branch-0 both exist, completion offers the qualified remote name, but wt switch origin/remote/branch-0 resolves to the local branch. That suggestion promises a different target from the command. Use the full local branch inventory when suppressing remote candidates, including collisions on the remote's unqualified name.

Comment thread src/completion.rs Resolved
Comment thread src/completion.rs Resolved
@max-sixty
max-sixty merged commit bc8ad63 into main Oct 27, 2026
37 checks passed
@max-sixty
max-sixty deleted the feat/issue-4612 branch October 27, 2026 16:11
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.

wt switch origin/ does not automatically list and autocomplete remote branches from that remote

2 participants