a clipboard roundup
To write to the system clipboard from the command line, you can pipe to the standard input of a program. But the name of that program is different on different operating systems, because honestly so is everything.
-
- Windows
clip.exe
-
- MacOS
pbcopy
-
- ChromeOS
-
wl-copy, from the packagewl-clipboard. This might work on other Unixy systems using Weyland for interprocess stuff.
-
- Linux / XWindows
- It looks like
xcliporxsel. It's weird not to have a Linux computer handy anywhere.
So an Emacs person would do M-| pbcopy to send the current region to
the clipboard.
The Stack Overflow thread linked above has lots of links and discussions.
Previous clipboard stuff: