Repository navigation
Worktree picker: search also by branch name #66385
Closed
michelinux
started this conversation in
Feature Requests
Replies: 1 comment
|
PR has been merged. Closing the conversation. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
What are you proposing?
I would like to have the worktree picker match against both the worktree directory name and the branch checked out in that worktree:
Why does this matter?
When I open the git worktree picker, I usually think about the worktree I want in terms of the branch it has checked out instead of the directory name on disk. The branch picker instead is working to checkout the branch in current worktree, rather than doing a switch.
Today the picker only fuzzy-matches against the directory name, so if my worktree directory is called
zed-fix-1234but the branch isfeature/search-highlighting, typing "highlight" finds nothing.Right now my typical behaviour is to go to the right worktree via the terminal and do a
zed .from it. My intention is to make this switch easier and faster.Are there any examples or context?
Let's imagine I branch
a-random-branchchecked out in worktreezed-deliberate-purpose.The current picker cannot find it if we search using word
random:While the wished behaviour is to find it and switch by fuzzy searching the branch name OR the worktree name:
Possible approach
I have a working implementation that I have been used for a few weeks now, which works fine and it's reactive with megarepos and tens of worktrees. You can see it in the draft PR: #66384.
All reactions