I would like to somehow create links to files within the terminal from search results found when searching files. Same way you would click a hyperlink within the terminal, but in this case it would be a file and not an URL. Is this possible?
Below is the command in which I am working with.
grep -rnw "$2" -e "$1"
... and here is a screenshot when searching my logs for term "filezilla"
I would like to be able to click on the purple text which are exact file locations, the same way I would open a hyperlink within the terminal.
I tried this command below, but all this does is automatically open every search result found with the preferred program, in this case the program being mousepad.
grep -rnw "$2" -e "$1" | xargs mousepad