CTRL-X CTRL-E will take you into your editor[1] from the command line, where you can paste away and see&#x2F;edit if necessary. Once you exit from the editor the commands that were entered will be run.<p>So (if vi): CTRL-X CTRL-E i CTRL-V[2] ESC :wq<p>[1] at least in bash, possibly others.<p>[2] or whatever your paste shortcut is, and then edit if necessary<p>Edit: seems this is also possible for zsh but needs some config first: <a href="http:&#x2F;&#x2F;nuclearsquid.com&#x2F;writings&#x2F;edit-long-commands&#x2F;" rel="nofollow">http:&#x2F;&#x2F;nuclearsquid.com&#x2F;writings&#x2F;edit-long-commands&#x2F;</a>