←back to thread

2039 points Gadiguibou | 1 comments | | HN request time: 0.24s | source
1. iuafhiuah ◴[] No.36492108[source]
I find it so annoying that these only work with plain text and RTF. On X11 there is `xclip`[0] and on Wayland there is `wl-clipboard`[1] both of which support binary file formats either through parsing the header or explicitly setting the MIME type.

This means you can do things like copy an image from the terminal and paste it into a graphical program like a browser or chat client and vice-versa. Also can be very useful in shell scripts for desktop automation.

The workaround on MacOS is to use AppleScript via `osascript` to `set the clipboard to...`.

  [0] https://github.com/astrand/xclip
  [1] https://github.com/bugaevc/wl-clipboard