This question already has an answer here:
I am on the bash shell and I want the output of a command to appear directly in the command prompt that appears after the command has executed !
Example of what I envision it, to illustrate my idea:
locate create_tables.sql|MAGIC_command user@localhost:~# /usr/share/doc/phpmyadmin/create_tables.sql
Now, using comman dsubstitution like this
sudo $(locate create-tables.sql)
works but immediately executes the output, I'd like to be able to edit it before. Is there a way?