I have a knowledge base (aka Zettelkasten) of markdown files. And I use searching with the next command grep -irn 'search request' *.md. All works fine.
But I'd like see output with the title of the file and sub header of the found string.
The sample
file.md
1 # Title 2 3 ## Subtitle 4 5 yada-yada Output
> grep -irn 'yada' *.md < file.md:5:Title:Subtitle:yada-yada Can I do this with grep without multiple search in the file?
An analogue of recall for terminal would be ideal.