Skip to content
Prev 10798 / 15075 Next

Clipboard problems

On 03 Sep 2014, at 13:56 , Duncan Murdoch <murdoch.duncan at gmail.com> wrote:

            
I think that the issue is that the last line is incomplete and pipe() is non-blocking

E.g.,

Peters-iMac:R-docs pd$ pbpaste
line 1
line 2
line 3Peters-iMac:R-docs pd$ 

and (with the same clipboard)
[1] "line 1" "line 2"

pushes back the incomplete line, hoping that it might be available for a later read. (It takes someone smarter than me to say whether this is unavoidable or whether pipe() should be able to detect that the
command has completed.)

This works, presumably because text connections are not non-blocking:
[1] "line 1" "line 2" "line 3"

-pd