Live data from Hacker News

Entering text in the terminal is complicated

jvns.ca

161–170 of 229 posts

Re: Entering text in the terminal is complicated

#161
post #77

Earlier quoted context omitted.

Essentially nothing in Windows requires cmd.exe. Having a terminal in a desktop OS isn't a problem. Needing one is. Just like having a GUI isn't a problem for a server OS, but needing one is a problem.

Apple would disagree with you on both counts. Plus for a long time desktop Windows needed cmd.exe to support login scripts. Just as people use Linux daily without ever touching the command line. Eg Android, LG smart TVs (webOS), Satellite TV set top boxes (eg Sky Q), home routers, etc. And if you want to focus on Linux running on laptops, then there are ChromeBooks and the old Asus EeePCs. The reason desktop Linux is…

> Just as people use Linux daily without ever touching the command line. Eg Android, LG smart TVs (webOS), Satellite TV set top boxes (eg Sky Q), home routers, etc.

None of those are (used as) general purpose computers though.

Re: Entering text in the terminal is complicated

#162
post #89
post #68

Earlier quoted context omitted.

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…

> 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 t…

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

#163
post #77

Earlier quoted context omitted.

Apple would disagree with you on both counts. Plus for a long time desktop Windows needed cmd.exe to support login scripts. Just as people use Linux daily without ever touching the command line. Eg Android, LG smart TVs (webOS), Satellite TV set top boxes (eg Sky Q), home routers, etc. And if you want to focus on Linux running on laptops, then there are ChromeBooks and the old Asus EeePCs. The reason desktop Linux is…

> Just as people use Linux daily without ever touching the command line. Eg Android, LG smart TVs (webOS), Satellite TV set top boxes (eg Sky Q), home routers, etc. None of those are (used as) general purpose computers though.

Did you read my next paragraph where I acknowledged that point myself and gave some laptop examples too?

Plus I’d argue Android is the average persons general purpose computer. At least in terms of the people I know, they use their phones for 99% of things and actively avoid using a laptop as much as they can.

Re: Entering text in the terminal is complicated

#164
post #77

Earlier quoted context omitted.

Apple would disagree with you on both counts. Plus for a long time desktop Windows needed cmd.exe to support login scripts. Just as people use Linux daily without ever touching the command line. Eg Android, LG smart TVs (webOS), Satellite TV set top boxes (eg Sky Q), home routers, etc. And if you want to focus on Linux running on laptops, then there are ChromeBooks and the old Asus EeePCs. The reason desktop Linux is…

I agree about Linux + KDE being more polished. For my main point, I suppose I should have specified GNU/Systemd/Linux as needing a CLI, not everything with a Linux kernel. POSIX-style kernel + libc is a very good basis for an OS, and such an OS doesn't need a CLI exposed to the user. It's all the Udev/Systemd/SysVInit & similar stuff that's CLI-only, and desktop Linux tends to require interacting with one or more of…

There are web based GUIs for systemd (and sysv init too).

But the main reason you don’t see GUIs for those services is because Desktop distros tend to abstract away systemd so you don’t even need to manage it, let alone have a GUI to do so.

Like with Windows, the average user wouldn’t be manually managing what services to start and stop.

And that’s the real crux of things. A lot of the stuff that people say you need a CLI for in Linux are operations that the average user wouldn’t know nor want to do on Windows even with a GUI. They just run a browser and if the machine goes slow they ask someone technical (friend or shop) to fix. I know this because I used to be that friend.

So I really don’t think the CLI is what holds back Linux. It’s just the economics was never there while Microsoft dominated the desktop world. And these days most people use phones and tablets as their general purpose device, so in a way Linux did eventually win anyway.

Re: Entering text in the terminal is complicated

#165

warp and and some powershell version were the only “terminals” i used that seemed fixing the input line, but also did not quite feel right. the worst parts of terminals for me are that input line does not behave like a normal text field with mouse click, select and everything a user would expect in another context, that history mostly scrolls on a line basis instead of smooth pixel scrolling like any other document (…

Ideally we'd have the equivalent of an ipython notebook for the terminal. But GUI on Unix is still an unsolved question with more and more incompatible implementations being written daily, so I'm not holding my breath. After using Linux for over 20 years now, I've concluded that if you want a desktop OS, use Windows. If you use Linux, learn to live in the terminal - it's the only consistently working piece of the OS, everything else is consistently broken.

Re: Entering text in the terminal is complicated

#166
post #52

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…

I think you could achieve this in Wezterm, which is configurable with lua. Not on my laptop right now but will try to get it working later. I have other keybinds that run specific lua functions.

Please do share what you learn! I'm considering switching from mac to Linux, and wezterm is my daily driver.

Re: Entering text in the terminal is complicated

#167

"The other day I asked what folks on Mastodon find confusing about working in the terminal, and one thing that stood out to me was "editing a command you already typed in". This really resonated with me: even though entering some text and editing it is a very "basic" task, it took me maybe 15 years of using the terminal every single day to get used to using Ctrl+A to go to the beginning of the line (or Ctrl+E for the…

> editing a command you already typed in

It's been mentioned here before, but you should suggest the Ctrl + X, Ctrl + E combo - they can edit the command in their favourite text editor and then it gets executed when they exit the editor.

Re: Entering text in the terminal is complicated

#169
post #29

Earlier quoted context omitted.

I wonder what terminal that is, because the Home and End keys, which I'm pretty sure are the expected alternatives, work fine in every terminal for me on Linux.

I feel like you're being willfully obtuse here. I can't remember the last time I used a laptop which had Home / End keys. Edit: actually I do remember -- it was an HP ProBook from 2011.

For the complaint to make any sense in the first place there needs to be an expected alternative way to go back to the beginning and end of a line. Otherwise it would be "it took me maybe 15 years to get used to being able to go to the beginning or end of a line in one keystroke". The two such options I'm aware of are Home/End (on macbooks I believe that is Fn+arrow keys) and Ctrl-a/Ctrl-e.

What alternative key combinations do you expect to work for the purpose?

Re: Entering text in the terminal is complicated

#170
post #71

Earlier quoted context omitted.

Here's a bonus: Ever ran a command that left your terminal mangled after it finished? No output, weird chars, etc. That's lack of proper tty hygiene on the offending command. Instead of killing your terminal, type: stty sane And you'll demangle it.

I think the command “reset” does something similar

Or `tput reset` to skip the one-second wait intended for hardware terminals.
Post reply on HN