Ish: Feature request: pbcopy/pbpaste style clipboard integration

Created on 15 Dec 2018  Â·  4Comments  Â·  Source: ish-app/ish

On the Mac, you can use the pbcopy/pbpaste commands to copy from and paste to the clipboard. It would be awesome if you could do something similar in iSH.

The way I see this working is through virtual devices, but maybe there's a more clever way to do it. On iOS, UIPasteboard stores clipboard entries as pairs of UTI (Universal Type Identifier) and content. So the ideal API is probably more complicated than simply reading and writing to a single virtual device.

Right now iSH supports copy and paste on the terminal, but that isn't as powerful as you're limited to text. The only way to get data in and out of iSH is currently the file system, which is less convenient in some cases.

I think the feature in itself is pretty cool, but it would also be very powerful to use together with Siri Shortcuts (#59).

Most helpful comment

A /dev/clipboard device would be pretty easy to add.

All 4 comments

iSH runs Linux, so xsel and xclip are good alternatives. But, they normally require a X window server which currently doesn’t supported by iSH.

A /dev/clipboard device would be pretty easy to add.

How would you go about reading from the clipboard?

I can write to it easily with echo foo > /dev/clipboard

But echo $(</dev/clipboard) doesn't seem to cut it… iOS tells me that text was pasted from the originating app, e.g. Apple Notes, but the ash in iSH doesn't print anything.

cat /dev/clipboard

Was this page helpful?
0 / 5 - 0 ratings

Related issues

boigarfield00 picture boigarfield00  Â·  6Comments

wsjyhaozi picture wsjyhaozi  Â·  4Comments

tommythorn picture tommythorn  Â·  4Comments

jcampbell05 picture jcampbell05  Â·  5Comments

fernandotcl picture fernandotcl  Â·  6Comments