PatrickF1 / fzf.fish

🔍🐟 Fzf plugin for Fish
MIT License
1.96k stars 78 forks source link

Add a "grep directory" keybinding #258

Closed sartak closed 2 years ago

sartak commented 2 years ago

This PR adds a new kind of search: grep directory. It's similar to "search directory" but instead of fuzzy-matching file names, grep directory does regex-matching on file content, powered by rg. The default hotkey is ctrl-g.

Here's what it looks like, and one example of why I think it's cool.

grep-directories

There's a few minor shortcomings that I left out for now to avoid complicating the code. If you think this feature is worthy of inclusion, I'd be happy to give any or all of these a shot!

Anyway, thanks for fzf.fish! Let me know if there's anything you'd like me to improve on here.

PatrickF1 commented 2 years ago

Hi Shawn, thanks for being interested in contributing. To be honest, this is a really tough feature to add for various reasons. See my previous thoughts on it here. https://github.com/PatrickF1/fzf.fish/pull/118#issuecomment-780738223

Even if we implement this exactly the way I specified in the comment, I'm still not sure I would merge it.

sartak commented 2 years ago

That's unfortunate :/ Thanks again for fzf.fish.

PatrickF1 commented 2 years ago

Sorry about the wasted time spent on this. And thanks for being a good sport and understanding!

sartak commented 2 years ago

It’s all good! Most of the time was spent on the implementation, which I can still keep for myself :)

If you change your mind please let me know and I can polish this up for inclusion.