4 ms·
here's another gem. src/ink/termio/osc.ts:192–210 void execFileNoThrow('wl-copy', [], opts).then(r => { if (r.code === 0) { linuxCopy = 'wl-copy'; return
by mohsen1 7mo ago
here's another gem. src/ink/termio/osc.ts:192–210
void execFileNoThrow('wl-copy', [], opts).then(r => {
if (r.code === 0) { linuxCopy = 'wl-copy'; return }
void execFileNoThrow('xclip', ...).then(r2 => {
if (r2.code === 0) { linuxCopy = 'xclip'; return }
void execFileNoThrow('xsel', ...).then(r3 => {
linuxCopy = r3.code === 0 ? 'xsel' : null
})
})
})
are we doing async or not?
- sudo_man 7mo ago[flagged]
- almostdeadguy 7mo agoA defining work of the "just vibes" era.
- mrcwinn 7mo agoYou fail to mention the prior decades of really bad software engineers writing awful code -- off of which these models trained.
- almostdeadguy 7mo agoYes, anthropic is not the only company in the world with some shitty code, and yet I feel no pangs of guilt over laughing about it.
- visarga 7mo agoClaude Code says thank you for reporting, I bet they will scan this chat to see what bugs they need to fix asap.
- NooneAtAll3 7mo agowhat does that even do?
- clankerbad 7mo agoLooks like it tries wl-copy, then tries xclip and then tries xsel. I have no idea what those are but google says it's for Wayland, so, I think it's a linux function trying to copy to clipboard? I think their problem is with the use of '.then(...=>...)' since there doesn't seem to be a way to tell each function that the nested ones actually finished.
- komali2 7mo agowl-copy is a program to put text into the system clipboard if you're on a wayland-based system (so you can ctrl-v paste it somewhere else). Imagine like, cat ~/.ssh/whatever | wl-copy and then pasting into github or something. xclip is the same for X based systems.
- dolmen 7mo agoIt looks like a search for the command line tool available to send content to the clipboard. Can't tell if that obfuscated code works though.