Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Isn't copying without the formatting just a `<your diff command> | pbcopy` away?


I have Gemini set to decipher HN comments that I don't immediately understand. This is a macos only command `pbcopy`?

Aside: Gemini mentioned it didn't want me to ask it questions about bikeshedding what shade of blue on a website header so I think it's got our number.


Though, if you have a preferred shade of blue, you can actually use it for the HN header in your user settings.


Yes pbcopy is a mac thing. On Linux, there are of course many different commands in different environments/distros. xsel, xclip, wl-clipboard, wlclip to name a few.

On windows, powershell has Get-Clipboard and Set-Clipboard, and cmd.exe has `wsl` to fix the issue of having used cmd.exe to begin with.


There's also clip(.exe) on every version of Windows I've bumped into recently.


On Linux I made a ~/bin/pbcopy that does the right thing because all the Linux commands are stupidly difficult to remember compared to "pbcopy".




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: