Hello,
When I paste the contents of the clipboard to the command line via pbpaste, there is also a carriage return implicitly pasted (i.e. whatever gets pasted is automatically sent as a command). Is there a way to use pbpaste without this feature, so I can edit the text before sending the command?
$ ll
total 0
drwxr-xr-x 2 scott staff 68 Jan 15 21:20 .
drwxr-xr-x+ 58 scott staff 1972 Jan 15 21:20 ..
$ touch x
$ ll
total 0
drwxr-xr-x 3 scott staff 102 Jan 15 21:20 .
drwxr-xr-x+ 58 scott staff 1972 Jan 15 21:20 ..
-rw-r--r-- 1 scott staff 0 Jan 15 21:20 x
$ # I put "rm x" in the clipboard at this point
$
$ pbpaste
rm x$ ll
total 0
drwxr-xr-x 3 scott staff 102 Jan 15 21:20 .
drwxr-xr-x+ 58 scott staff 1972 Jan 15 21:20 ..
-rw-r--r-- 1 scott staff 0 Jan 15 21:20 x
You're right. Once it is pasted, a new prompt appears immediately to the right of the paste, and the pasted text cannot be edited to launch as a command. Do you know if there is a way to do this?