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

WIP: support filtering #1993

Closed
wants to merge 17 commits into from
Closed

WIP: support filtering #1993

wants to merge 17 commits into from

Conversation

jesseduffield
Copy link
Owner

@jesseduffield jesseduffield commented Jun 11, 2022

We already support searching in views, however this PR introduces a different kind of searching. In list views we want to actually filter down the items of the list based on what matches your search string. On the other hand, for the main view, we still want to show the original contents without filtering anything down, but we want to highlight the matches.

Open questions:

  1. are there still valid use cases for not wanting to filter down when searching in a list view
  2. should we highlight matched search strings in our list views? Looks a little cluttered to me.

TODO:

  • fix panicking from calling SetTree
  • disable some commands that are nonsensical when filtering (e.g. cherry-picking a range)
  • ensure filtering doesn't affect other commands (e.g. if a command does an interactive rebase in the background, that should be based on the full list of commits, not the filtered list).

@jesseduffield jesseduffield changed the title support filtering WIP: support filtering Jun 11, 2022
@ooloth
Copy link

ooloth commented Nov 8, 2022

@jesseduffield I'd love to see this feature land! Especially for filtering branches. This filtering functionality would be great (since it's lazier than having to nail exact searches with /).

See #2057 for some discussion about use cases (it mentions also supporting fuzzy search results, but even just filtering lists by exact search strings would be a lovely first step).

Either way -- thanks so much for lazygit. Loving it.

@jesseduffield
Copy link
Owner Author

I'm closing this PR cos it's drifted quite a bit from the master branch, and I've learnt a better way of doing filtering from adding the feature to lazydocker. I WILL get back to this!

@jesseduffield jesseduffield deleted the filtering branch March 20, 2023 02:35
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.

2 participants