News for hackers. Stuff that matters.
Re:Show HN: pbcopy/pbpaste across machines via Gitlab Snippets by freedomben on Sunday November 22, 2020 @10:23AM (#25178107)
On Linux (where pbcopy and pbpaste apparently don't exist), I've been using a bash function `cb` (to copy clipboard) and `cbf` (to copy a file to a clipboard) for years. If you install xclip on your system and add this to your .bashrc you can get it too: https://gist.github.com/FreedomBen/8d4d0a89fd39c8b5a5c4d5dcf...

Luckily I added a link to where I got it, because I had long forgotten. Thanks Nathan! Nathan's blog post is excellent and should be read: https://madebynathan.com/2011/10/04/a-nicer-way-to-use-xclip...

Re:Show HN: pbcopy/pbpaste across machines via Gitlab Snippets by pubg on Sunday November 22, 2020 @01:26PM (#25179660)
It's rather straightforward to create .bashrc aliases on Linux to transform xclip or xsel into pbcopy and pbpaste [0]:

  alias pbcopy='xclip -selection clipboard'
  alias pbpaste='xclip -selection clipboard -o'
[0] https://superuser.com/a/288333/72342