Skip to content
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

Fuzzy find files for showing file history #1525

Closed
screendriver opened this issue Oct 18, 2021 · 2 comments · Fixed by #1526
Closed

Fuzzy find files for showing file history #1525

screendriver opened this issue Oct 18, 2021 · 2 comments · Fixed by #1526
Labels
enhancement New feature or request

Comments

@screendriver
Copy link
Contributor

Is your feature request related to a problem? Please describe.

Sometimes I want to show all commits for a given file to see all changes for that single file. lazygit already has this feature when you press <ctrl-s> ("view filter-by-path options...") but you have to enter the path by hand without the ability to search or autocomplete the path.

Describe the solution you'd like

It would be great if lazygit would have the ability to fuzzy find that file like you can do with fzf.

Describe alternatives you've considered

At the moment my workflow looks like this:

  • I'm hitting <ctrl-s> ("enter path to filter by")
  • then I'm hitting : ("execute custom command")
  • then I'm entering / opening nnn with nnn -x
  • I'm searching the file that I'm looking for and copy the path
  • I'm leaving nnn and hit <cmd+v> to paste the copied path into the dialog that lazygit is still showing

So in general everything is working as expected but it's a little bit cumbersome and not so convenient / intuitive.

Additional context

See also the discussion here #1377

@screendriver screendriver added the enhancement New feature or request label Oct 18, 2021
@jesseduffield
Copy link
Owner

jesseduffield commented Oct 18, 2021

I'm taking a look in https://github.com/junegunn/fzf and it's written in Go, with an MIT license, so we should be able to make use of its algorithm, but I'm not sure how to plug into it. I can see it has an algorithm package but can't see where it handles loading files. Or does fzf not actually load the files itself? I haven't really used it

@jesseduffield
Copy link
Owner

@screendriver could you give #1526 a go?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants