3 ms·
I just solve that terminal issue by using a terminal that has "smart copy". The two I know of that do are pantheon-terminal (from elementaryOS) and kitty. The i
by francislavoie 6y ago
I just solve that terminal issue by using a terminal that has "smart copy". The two I know of that do are pantheon-terminal (from elementaryOS) and kitty. The idea is that Ctrl+C behaves normally (sends SIGINT) unless you have text selected, in which case it will copy the selected text then clear the selection. So if you had something selected, you just hit Ctrl+C twice to send an interrupt if you need to, with the convenience of Ctrl+C working just like you'd expect in every other app.
- bscphil 6y agoThis sounds to me like one of those ideas that's great in theory but real-life situations are too fragile to make it work. Suppose you're trying to copy something out of the window with a long-running process. You select some text and then press Ctrl-c, but whoops your hand jerked and you tapped c twice. Process killed. Or as you moved your hand to hit the shortcut, whoops you bumped the trackpack and clicked, deselecting your text, and Ctrl-c killed your process. Obviously either of these would rarely happen, but every time I use a terminal in macOS I end up accidentally killing a process because I can't keep the modifier keys straight, so I'm sensitive to introducing the issue on Linux. (On Linux, I have the opposite problem, which is that I try to Ctrl-shift-c in Firefox, which opens the dev tools.)
- Someone 6y ago“your hand jerked and you tapped c twice. Process killed” I don’t see how that can happen. If you tap c twice, you either copy twice (copying keeps text selected), which is harmless, or, if you release the control key between the taps, type a c, which doesn’t kill the process. The accidental deselect, on the other hand, can indeed be problematic.
- toxik 6y agoIt was explicitly stated that copying deselected text and that ^C^C copies and kills.
- alanbernstein 6y agoThis is a fair concern, but personally, 99% of the time I'm copying from a terminal, it's when there is not an active process (usually copying an unexecuted command from the current prompt). So I don't see any issue with this for my use.
- RealStickman_ 6y agoYou don't even need to use Ctrl+C in kitty. You can just select it and it will be in your clipboard. And then just middle click to paste again.
- toxik 6y agoAh yes but it’s not in your clipboard, it’s another buffer entirely.
- francislavoie 6y agoI _don't_ want that though. I use text selection as a reading aid, so selecting stuff immediately clobbering my buffers is very much not what I want. I prefer to be explicit about when I want to copy stuff.
- rbreaves 6y agoWith Kinto I really don’t care which terminal you use, new or outdated - it’ll work the same as they do on a Mac. Also eOS implementation has its issues, smart copy needs to be disabled too for Kinto to work - thankfully it’s practically the only one.