Earlier quoted context omitted.
It's provided by the terminal (emulator) in "cooked" mode: https://en.wikipedia.org/wiki/Terminal_mode raw mode doesn't do this.
To be clear, it's not the terminal emulator (xterm, mintty, iTerm2, etc.) that does this. It's the tty layer. You can use the stty command to change the settings.
Entering text in the terminal is complicated
81–90 of 229 posts
Re: Entering text in the terminal is complicated
#82Nowadays, programs should be hard-coded to accept ANSI sequences and ignore TERM (unless they need to make some fine-grained distinction like do we have 256 color xterm compatibility).
Those programs will never have that problem of not understanding arrow keys.
Re: Entering text in the terminal is complicated
#83I have continually contented that the terminal is the single thing eternally condemning Linux to It's not just entering text. The entire experience is complicated. It's a Concorde jet cockpit[1] (with no labels too), when 95% of the population just wants to fly their drone around[2]. [1] https://qph.cf2.quoracdn.net/main-qimg-2566f4c91b894e4169d77... [2] https://media.thedroningcompany.com/images/tincy/WQZpC56vqMp...
Linux the kernel + some userland without terminal is used by majority of people in the form of Android and Chromebooks. A terminal is a developer and sysadmin tool. It just so happens that most users of desktop GNU/Linux are developers and sysadmins. They are a few percent of population.
Exactly, so why hasn't the open source community driving free distros taken note of this?
Now more than ever, people want out of Windows, but the only they step into the seat of exit craft and see the above cockpit.
Re: Entering text in the terminal is complicated
#84> First, there’s “the baseline” – what happens if a program just accepts text by calling fgets() or whatever and doing absolutely nothing else to provide a nicer experience. [...] there are actually a few features that you get for free just from your terminal, without the program needing to do anything special at all. The things you get for free are: [...] - backspace - Ctrl+W, to delete the previous word - Ctrl+U, t…
Re: Entering text in the terminal is complicated
#85Earlier quoted context omitted.
> As computer lovers, I feel we must endeavour to remain mindful that almost everyone else aren’t like us. They’re trying to get a task done. They don’t want to maintain or talk with the computer. This was pretty much my point. 95% of the population isn't like us, and don't need to interact with the terminal; thus, thinking the terminal is what's keeping Linux back doesn't make much sense to me
The larger issue is the times that the Linux UX goes off the rails and the solution turns out to be "You're going to have to bleat this esoteric incantation at the command line." I plugged my laptop into a second monitor the other day and, oops, for whatever Godforsaken reason it didn't auto-detect. Suddenly I'm munging around in `xrandr` to get my screens to work. To its credit, all the major desktop distributions t…
My wife's Macbook won't suspend correctly when it's plugged into a Dell monitor, the monitor going into power save wakes up the laptop. I wish there was an arcane incantation that would fix it, but no, the proprietary walled garden is well locked up, with glossy user-friendly rounded corners everywhere.
Re: Entering text in the terminal is complicated
#86This is nice. As always, Julia's articles are always a win. Here's some stuff that's missing: Within shell scripts, you can use `stty` to change a lot of stuff about the terminal, including how it deals with inputs. You can rewire all of these defaults and behaviors. Here's an experiment I did a while ago using sh and stty: https://gist.github.com/alganet/63f1dbc97b8fd35f7bb14ec30f79... It is able to capture and unde…
Re: Entering text in the terminal is complicated
#87In bash, if you set $EDITOR to your favorite text editor, you can send the current line to $EDITOR with ctrl-x ctrl-e. After editing the command you can save and exit for the command to execute.
bind '\C-e: edit-and-execute-command'
Re: Entering text in the terminal is complicated
#88Earlier quoted context omitted.
Linux the kernel + some userland without terminal is used by majority of people in the form of Android and Chromebooks. A terminal is a developer and sysadmin tool. It just so happens that most users of desktop GNU/Linux are developers and sysadmins. They are a few percent of population.
>Linux the kernel + some userland without terminal is used by majority of people in the form of Android and Chromebooks. Exactly, so why hasn't the open source community driving free distros taken note of this? Now more than ever, people want out of Windows, but the only they step into the seat of exit craft and see the above cockpit.
Gnome tries hard to emulate Apple's approach. Results are mixed, but I've seen fans of it.
Elementary OS goes in the "normal users" direction, too.
OTOH if something goes badly wrong, and you do need to open the hood and follow an arcane tech support recipe, you open a command line, be it Linux. macOS, or Windows. (Not Android or iOS though, where you do a reset + restore dance.)
> people want out of Windows
Yes, here's where they meet Steam Deck, that did take note, and just puts you into a cared-for gaming environment. It can also run a typical desktop. The hardware is proprietary, but the software is (mostly / completely?) free.
Re: Entering text in the terminal is complicated
#89So when I use Windows Terminal and I press Ctrl-C, it always does the right thing: If I’m selecting text I want to copy it, if I’m not selecting text I want to kill the running process. On Linux, every Terminal app I’ve used stubbornly refuses to copy when I press Ctrl-C, demanding I press Ctrl-Shift-C. When I paste, if I forget my manners and use Ctrl-V instead of Ctrl-Shift-V, I am punished by getting a weird chara…
I copy from/to terminal with middle mouse button. Just select some text and click middle button where you want to paste the text. Some people don't like it because it needs a mouse, they prefer to keep their hands on the keyboard, but I don't see any issues with it. 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 t…
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
#90I have continually contented that the terminal is the single thing eternally condemning Linux to It's not just entering text. The entire experience is complicated. It's a Concorde jet cockpit[1] (with no labels too), when 95% of the population just wants to fly their drone around[2]. [1] https://qph.cf2.quoracdn.net/main-qimg-2566f4c91b894e4169d77... [2] https://media.thedroningcompany.com/images/tincy/WQZpC56vqMp...
When you log into a BSD box, it's like taking a time machine back to the 1980s.