So 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…
Entering text in the terminal is complicated
61–70 of 229 posts
Re: Entering text in the terminal is complicated
#62I plan to make one day an alternative to terminals. My idea is not fully fleshed out, but I would like to try to forgo TTYs altogether. Use only pipes, file descriptors and job control. The closest thing I saw to what I have in mind is this: https://github.com/letoram/cat9/ but more in a way of interface.
I suppose the latter. Have you checked Oilshell, Elvish, or PowerShell (yes, on Windows)?
Re: Entering text in the terminal is complicated
#63It took the author 15 years to learn basic readline commands?
It's funny how other programs don't seem to have this issue, and their users are able to learn new things without having to resort to an external manual. Makes one wonder about the design of everyday things!
Re: Entering text in the terminal is complicated
#64> 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…
It's provided by the terminal (emulator) in "cooked" mode: https://en.wikipedia.org/wiki/Terminal_mode raw mode doesn't do this.
Re: Entering text in the terminal is complicated
#65So 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've always configured my terminal to copy on select. I never press ctrl-c. I mean, why would I want to select text if not to copy it?
Re: Entering text in the terminal is complicated
#66https://pliszko.com/blog/post/2021-10-31-natural-text-editin...
Re: Entering text in the terminal is complicated
#67I 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...
Doesn't Windows, the most popular OS out there, have a cmd.exe terminal thing? Why isn't that harming Windows? The Windows Command Prompt's default experience is worse than most if not all terminals you find on Linux systems. Even in play TTY, you're bound to find that the shortcuts the author mentioned work like a charm. To make my cmd.exe bearable I am using https://chrisant996.github.io/clink tl;dr You're comparin…
Just like having a GUI isn't a problem for a server OS, but needing one is a problem.
Re: Entering text in the terminal is complicated
#68So 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…
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.
Re: Entering text in the terminal is complicated
#69I have great respect for Julia Evans and love her contributions that get shown here. But... > "I’ve always thought that vi mode seems really cool, but for some reason even though I’m a vim user I didn’t really like using it when I tried it." Really, that seems weird to me. I use zsh (btw) and the problem she describes is a non-issue. And I am not a pro. (Sorry, Julia).
I use tcsh, and have it configured for emacs-style command line editing. I use emacs for complex stuff (coding) and vi for simple stuff (editing a config file), so I'm comfy with both.
I think my issue is that it seems slightly unnatural to remember the mode I'm in on a random terminal command line, and much easier to just use the emacs keys to edit when needed.
Re: Entering text in the terminal is complicated
#70Here'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 understand most keyboard combinations and even mouse gestures (hold/drag/drop) from within the shell in any VT100-compatible terminal (mintty, xterm, Terminal.app, vscode, so many others).
Runnable demo:
bash -c "$(curl -L https://git.io/fjToH)"
Run it and press some keys or move the mouse. Use Ctrl+W to exit. It supports zsh and ksh too, but not dash or other shells lacking `read -rn1`.---
Here's another funny thing:
`vi | cat -v`
If you pipe an interactive program to `cat -v`, you can see which VT100 escapes that program is using. I learned a lot from how vi does it.