I want to write a shell script that search for a pattern inside all the files in a specific directory (say, my '.config' folder). Using grep I wrote the following:
grep -Ril "<pattern>" .config
Next I was trying to change the search pattern on the fly using something like:
grep -Ril "" .config | fzf --preview='<preview> {}'
, but since I'm passing the filename to fzf - I can only filter the results by names...
Basiclly I'm looking for something like:
grep -Ril "<fzf_pattern>" .config | fzf --preview='<preview> {}'