by kristopolous · 5y ago · 0 comments
I'm clearly not smart enough to do it without having to think about the process every time
No problem copying a few MBs of output this way (100,000 lines for instance).
cat file.txt | pbcopy
This adds the contents of file.txt to your clipboard.What could they do instead? There's so many trivial solutions. A clipboard named pipe for instance, or at least something that operates like one. Read is paste, write is copy. That's a very 1970 style fix that could have been done 35 years ago. Then anything that can read and write from a file can interface the clipboard, opening up a whole new array of applications without setting aside "highlighting text" as having some special magical power.
Also having multiple clipboards is trivial, just have more of these special files. You can even set one aside if say some crazy old Xt application someone is still running only works with copy-on-select for some reason
A clipboard history is super trivial as well, just set up a pipe...
There's so many more unixy ways this could have been done. It's so dumb how it works. Heck dbus would be a less insane fix