problem
I need to fuzzy search a directory of textfiles, where the contents of the files is searched too. I am currently using ripgrep and fzf to do this, the problem is that each line of each file becomes a search item, i need each item to contain all lines of its file.
Example:
We have following two files:
example.md
something something foo something
something something foo something
something something foo something
something something foo something
useful-example.md
something something foo something
We run rg . | fzf in the directory containing them, write foo, and get following results:
useful-example.md:something something foo something
example.md:something something foo something
example.md:something something foo something
example.md:something something foo something
example.md:something something foo something
The problem here is that each line of example.md is a item, it should be one item containing each file. It should have looked something like this:
useful-example.md:something something foo something
example.md:something something foo something
......................something foo something
......................something foo something
......................something foo something
question
How can i go about making this? have somebody done this that im missing?