I have a complex command in my terminal window which I would like to edit further e. g.
echo "This is a complex command I want to edit in an editor"
How can I pipe this line of code – not the output but the actual code – to e.g. Gedit for further editing? Something along the lines of this solution, just for a GUI based editor: http://www.commandlinefu.com/commands/view/1446/rapidly-invoke-an-editor-to-write-a-long-complex-or-tricky-command
Please note that I'm specifically looking for a way to edit in an external editor.