I've used Filter Selection (Edit > Other > Filter Selection... or filter_command) to do something like that. It makes a temporary file of the current selection as input file and output is redirected to another temp file (cmd < in.tmp > out.tmp), and then the output temp file is read into the current selection, clean-up of temp files is done automatically. You can create a new empty file, create a line selection on Line 1, and call filter-command with the external cmd, and you should get results as long the cmd doesn't care about getting an empty line as redirected input. It's not exactly what you want, but it should be close enough.