3,508 karma · joined May 18, 2013
That’s an extraordinary claim.
Yes.
5.1 Horsepower
This problem is in no way unique to tmux. You have the same problem with any terminal app that takes over drawing, eg vim. That said it is also easy enough to fix.
The solution is OSC52, a terminal escape sequence that the emulator can use to interact with the system clipboard (kitty, alacritty, iterm2 all support this). The first step is to get you a script that writes out data in that protocol. Its easy enough:
#!/usr/bin/env python3
import os, base64, sys
clip = base64.b64encode(sys.stdin.buffer.read())
for pid in (os.getpid(), os.getppid()): # so that osc52-copy can be invoked by processes that themselves do not have a tty.
cty = f"/proc/{pid}/fd/1"
try:
fd = os.open(cty, os.O_WRONLY)
if os.isatty(fd):
os.write(fd, b'\x1b]52;c;') # the actual escape sequence
os.write(fd, clip)
os.write(fd, b'\a')
break
except:
continue
finally:
os.close(fd)
else:
raise SystemExit(f"no tty")
Now you can do this:$ grep my_thing < some.txt | osc52-copy
And whatever got into osc52 is now on your system clipboard.
Tmux (set -g clipboard on) and nvim (unset clipboard) both have native osc52 support, and the script above can be used to integrate other places.
$ cat test.sh
#!/usr/bin/env bash -c "echo hello"
$ ./test.sh
/usr/bin/env: ‘bash -c "echo hello"’: No such file or directory
/usr/bin/env: use -[v]S to pass options in shebang lines
$ ./test.sh # with -S
helloThink of just the work that goes into having an assembly line customized for a specific form factor. To keep price, quality, and profit in line with their other phones I think the answer here is clearly yes.
Yes, this is what I said.
> the natural gas used in making fertilizer is a source of hydrogen and energy, but not a significant source of N.
There is no nitrogen at all in natural gas.
Plants cannot use atmospheric nitrogen on their own. They depend on either bacteria or humans to create some usable form of nitrogen. Any carbon captured in a plant that depended on a fossil fuel source of nitrogen cannot be considered carbon neutral, unless you draw a useless system boundary.
You should be able to click left right on the prompt to see different responses. Sonnet 3.7 with extended thinking notices the issue, and then chooses to totally ignore it with no explanation.
From Claude for those who don’t want to click:
Wait, I notice a difference from the traditional riddle. In this version, the surgeon says "I can operate on this boy" (affirmative) rather than "I can't operate on this boy" (negative).
This changes the nature of the puzzle somewhat. If the surgeon is saying they CAN operate, then we need to explain why this is surprising or seemingly impossible, but actually possible.
The traditional answer would still apply: the surgeon is the boy's mother.
I don’t think it is shown that the flame retardants used by cal fire are the same as those in the article from nyu.