-
Notifications
You must be signed in to change notification settings - Fork 273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add fuzzy-finder for project switching #4317
Conversation
@ChrisPenner nice! I will definitely be using this. Would it be much effort and/or desirable to put the current project at the beginning (or end? Which is it?) of the list? My thought was that I'm often switching between |
@@ -230,7 +230,7 @@ data Input | |||
| DiffNamespaceToPatchI DiffNamespaceToPatchInput | |||
| ProjectCreateI Bool {- try downloading base? -} (Maybe ProjectName) | |||
| ProjectRenameI ProjectName | |||
| ProjectSwitchI ProjectAndBranchNames | |||
| ProjectSwitchI (Maybe ProjectAndBranchNames {- Nothing triggers fuzzy-finder -}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ProjectSwitchI (Maybe ProjectAndBranchNames {- Nothing triggers fuzzy-finder -}) | |
| ProjectSwitchI (Maybe ProjectAndBranchNames {- `Nothing` triggers fuzzy-finder -}) |
P.wrapColumn2 | ||
[ ( P.sep | ||
" " | ||
[ backtick (P.sep " " [P.string cmd, "foo"]), | ||
"removes the", | ||
P.string target, | ||
"name `foo` from the namespace." | ||
], | ||
"" | ||
), | ||
( P.sep | ||
" " | ||
[ backtick (P.sep " " [P.string cmd, "foo bar"]), | ||
"removes the", | ||
P.string target, | ||
"name `foo` and `bar` from the namespace." | ||
], | ||
"" | ||
) | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delayed ormolu?
Has a merge conflict now but otherwise looks good 😬 |
@ceedubs Okay I put the active project at the bottom :) I'll leave sorting by "frecency" for another day |
Overview
Adds fuzzy-finder for
switch
without any arguments which lists all project/branch pairs for you to search, whatever you select will be switched to.Implementation notes
Nothing
, trigger a fuzzy-find to fill it in.fzf
is killer fast, so should have no problem handling thousands of branches if it comes to that.Interesting/controversial decisions
Should it search projects, then search branches instead?
Test coverage
None