Live data from Hacker News

Entering text in the terminal is complicated

jvns.ca

111–120 of 229 posts

Re: Entering text in the terminal is complicated

#111
A meta-question for those of us very comfortable composing complex sequences on the command line: when I’m trying to help someone with something, how can I avoid becoming frustrated by their lack of facility - or worse, their lack of interest in obtaining facility, without being an ass and taking over the keyboard? Grumble.

Re: Entering text in the terminal is complicated

#112
post #88

Earlier quoted context omitted.

>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.

> free distros taken note of this? 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.) >…

> you open a command line

Except Classic Mac OS never had this. You'd sometimes need to do arcane rituals like "re-bless the system folder", but they were entirely GUI-based arcane rituals that involved double-clicking icons, opening and closing windows, and dragging files in and out of folders.

Re: Entering text in the terminal is complicated

#113

I've never seen dash dump escape sequences instead of acting on arrow keys. Probably, it's due to a missing or wrong TERM value? Nowadays, 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.

it's more likely because she's running a version of dash compiled without readline support, probably debian's version (which is compiled that way because it's not intended as an interactive shell, but rather the lightest-weight posix-compliant shell they could build)

i agree about ansi sequences. even that doesn't go far enough, though: we should probably be moving past character-cell terminals to something better so we can have things like proportional fonts, multiple font sizes, properly spaced borders, and rounded corners

Re: Entering text in the terminal is complicated

#114
post #88

Earlier quoted context omitted.

> free distros taken note of this? 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.) >…

> you open a command line Except Classic Mac OS never had this. You'd sometimes need to do arcane rituals like "re-bless the system folder", but they were entirely GUI-based arcane rituals that involved double-clicking icons, opening and closing windows, and dragging files in and out of folders.

There was no other, simpler interface. And the whole system was much simpler (and less capable). The graphical hardware was way simpler and fully in-house, unlike the current GPUs that are third-party and evolve quickly.

Re: Entering text in the terminal is complicated

#115
post #94
post #33

Earlier quoted context omitted.

Windows has a new terminal as default that is pretty cool - I install MSYS2 and set it in the new Windows Terminal and it's all good. Gnome Terminal and other terminals on Linux are also pretty cool too. If you want the worst default terminal experience just boot macOS.

Can you explain what's the big appeal of other terminal apps? I have been using Terminal for 21 years without any issue -- but I'm open to trying something else. Actually I've only this year switched to an "AI enabled" terminal app called Warp.

I’m curious to know what your experience of changing to Warp has been like? Sounds like terminal was working fine for you - was the switch worth the time?

I signed up for the waitlist ages ago and finally got the announcement of Linux support in February but am still yet to try it. Mainly because I’ve had a particularly busy year and I can’t justify fiddling around with my stack just for fun. I have no appetite for the risk I may lose hours to fixing something that goes wrong.

Re: Entering text in the terminal is complicated

#116
post #106
post #100

Earlier quoted context omitted.

I always just use the home and end buttons for that kind of thing.

i don't even know where they are without looking at the keyboard. then when i try to press them half the time i accidentally press insert or print-screen instead

When I have this problem I remap the key I needed to a location that does work for me.

Re: Entering text in the terminal is complicated

#117
post #114

Earlier quoted context omitted.

> you open a command line Except Classic Mac OS never had this. You'd sometimes need to do arcane rituals like "re-bless the system folder", but they were entirely GUI-based arcane rituals that involved double-clicking icons, opening and closing windows, and dragging files in and out of folders.

There was no other, simpler interface. And the whole system was much simpler (and less capable). The graphical hardware was way simpler and fully in-house, unlike the current GPUs that are third-party and evolve quickly.

Exactly, there was no other, complicated interface. Except in 1991-1995 when System 6 was going to merge with AIX and be A/UX and Apple was going to merge with IBM and it was all briefly very weird.

Re: Entering text in the terminal is complicated

#118
post #99
post #96

the top three default readline keybindings that would improve people's lives if they knew about them: - control-w, which julia mentions in the post, to delete the last word - control-o: when you're recalling a line from history, edited or no, runs the line and recalls the following line from history . so you can run a sequence of five commands from history by navigating to the first one and hitting control-o five tim…

Oh I always do ctrl+shift+r for that last bit, like reverse-tabbing on a gui. Good to know about ctrl+s, though I imagine muscle memory will prevent me for ever using it. :)

normally control-shift-r is just control-r; both key combinations send the same byte, 0x12, so they both search backwards in readline history. is your terminal emulator doing something different? if you type control-v control-shift-r enter control-d as the input to the command od -t x1a, what does it say?

Re: Entering text in the terminal is complicated

#119
post #106

Earlier quoted context omitted.

i don't even know where they are without looking at the keyboard. then when i try to press them half the time i accidentally press insert or print-screen instead

When I have this problem I remap the key I needed to a location that does work for me.

now you have two problems

Re: Entering text in the terminal is complicated

#120

Over 20 years ago now I wrote a state machine around readline that meant you could use it as a multi-line editor. Not "multi-line" as in a single line can wrap, but a true editor that lets you move up and down, but is windowless. Here's a video: https://github.com/colmmacc/jot/raw/master/jot-demo.mp4 and the CVS repository for the Unix terminal IM client it is part of is at: https://c-hey.redbrick.dcu.ie/src/c-hey_cv…

This was fascinating!! Please do consider bringing it back to life as a library and sharing with HN.

I had no idea how much better such an editing experience is until your video, and completely agree about the benefit of not having to context-switch a la git commit "interactive mode". The "inline typewriter" effect is also really cool

Post reply on HN