What you could do as an alternative is to parse output of grep
as an argument to your text editor of choice. For instance
COMMAND | grep -i filename | xargs nano
In this case nano is just a placeholder. You could use whatever text editor you want there. What you might want to do is to add a nohup
in front of text editor name, so that you can continue using terminal.
Some time ago I answered a question, Is it possible to open a terminal in the current directory?, which asked to "open in terminal". The workaround I've been using is to bind a shortcut to script. You could do something similar - bind a shortcut to simple script bellow:
#!/bin/bash
FILENAME=$(zenity --entry --text="Enter path to file")
if [ $? -eq 0 ]
nano $FILENAME
fi
This basically should bring up a popup asking for path to file.
The path can be copied from command line with CtrlShiftC, or you can download xclip
and pipe the output into xclip -sel clip
(which will put your text path into clipboard)