Re:Entering text in the terminal is complicated
by Uehreka on Monday July 08, 2024 @07:04PM
(#40910715)
> The trouble is programs running in terminal may want to deal with Ctrl-C by themselves. Text editors for example do that, but terminals have no way to know it. Terminals even don't know what program is running now, because job control is a job of a shell.
But then why does Windows Terminal (even when running against WSL) not have this problem? The terminal doesn’t need to know what’s running inside it to know “if text is selected, intercept Ctrl-C and copy the selected text”.
Re:Entering text in the terminal is complicated
by ordu on Tuesday July 09, 2024 @02:21AM
(#40913019)
Idk, but I can guess. In windows terminal and shell are not so separate as in Unix. For example, is cmd.exe is a terminal or a shell? I believe it is both. Probably it is the same with powershell.
Re:Entering text in the terminal is complicated
by jasomill on Tuesday July 09, 2024 @08:27AM
(#40915282)
This is a mistake, but forgivable, as Windows executable launch behavior blurs this distinction.
Just like UNIX shells, cmd and PowerShell are ordinary console programs.
The Windows equivalent to xterm and friends — i.e., the mechanism responsible for displaying console I/O in a window — is a bit complicated, has changed over time, and only recently (Windows 10 1809 / Server 2019) adopted a UNIX-like pseudo tty / terminal emulator model.
For a good overview of Windows console architecture, past and present, see
https://devblogs.microsoft.com/commandline/windows-command-l...
This way to copy/paste uses it's own Xorg buffer, so you can copy something with Ctrl-C and select something else, and then Ctrl-V will paste the first thing and middle click the second. I have issues using Windows and smartphones because I sometimes try to copy by just selecting things, forgetting to hit Ctrl-C or something. It is really annoying.
> Is there any terminal app for Linux that does things the Windows Terminal way and won’t slap me on the wrist for Improper Teletype Usage?
I think not. The trouble is programs running in terminal may want to deal with Ctrl-C by themselves. Text editors for example do that, but terminals have no way to know it. Terminals even don't know what program is running now, because job control is a job of a shell.