I often run commands using subshells, and sometimes would like to have the subshells expanded before I run something.. This way I could verify what I'm doing, and possibly edit what's about to happen as well.
For example, how can I get the following command line to be expanded before I run it, so I can edit the results of the subshell?
e.g.
$ find -name "test.txt"
/tmp/test.txt
$ mv $(!!) /tmp/new.txt
I'd like to see the subshell expanded before I run the command, like so:
$ mv /tmp/test.txt /tmp/new.txt
Is there some way to do this?
zshand it's great and does this, as you suggest... nice tip! I'll leave the original answer here, as it was abashquestion.