by birbs · 5y ago · 0 comments
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
reading yoru entirely comment, I am not entirely sure if you mean changing how it's implemented or if you really would like to get rid of the user interface it has.
Because copy-on-select along with middle-click-to-paste is like ... the best thing. Tiny bits of data stuck that follow your cursor is the most information-at-my-fingertip feeling that I can get out of these machines.