What does HackerNews think of xclip?

Command line interface to the X11 clipboard

Language: C

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
In addition to pbcopy for macOS and clip for Windows, there's also xclip for Linux. It doesn't look like it's been updated in a long time, but it meets my needs.

https://github.com/astrand/xclip

> How do you select text in your virtual terminal with the keyboard?

with xsel(1x) or xclip(1)

https://github.com/kfish/xsel

https://github.com/astrand/xclip

xclip : https://github.com/astrand/xclip

    (long pipeline that generates lots of output) | xclip
Or even just

    xclip < /some/file
Now paste where necessary.