Live data from Hacker News

Entering text in the terminal is complicated

jvns.ca

221–229 of 229 posts

Re: Entering text in the terminal is complicated

#221
post #73

Earlier quoted context omitted.

You are correct! I think it does a little more (restoring cursor if hidden, etc). If you have it, it is probably better than `stty sane`

Any idea what can cause the cursor to suddenly dissappear? It's the only issue I currently have with wezterm, an otherwise fantastic terminal emulator

Many, many interactive programs.

Programs that draw a progressbar often hide the cursor so there won't be a blinking cursor "glitching" the visuals. Once you see it, you'll start noticing programs that hide the cursor.

If it happens only on wezterm, it is probably some kind of bug on their part (no support for the escape code that re-enables the cursor maybe?). Have you tried other terminals?

Re: Entering text in the terminal is complicated

#222
post #212

Earlier quoted context omitted.

Remaps Capslock to Ctrl and it will make a lot of sense. Other heavily used shortcuts are Alt+d, Alt+Backspace, and Alt+Left|Right.

Still wouldn't, why would you use your weakest finger in the bad sideways motion for such a frequent operation???

It's usually the weight of my whole hand. I touch type, but my hands are usually tilted to the exterior. So I hit keys like Enter, Capslock, Shift, with the side instead of the tip of my fingers. And I don't mind sliding my whole hands if I'm going to use it repeatedly.

Re: Entering text in the terminal is complicated

#223
post #212

Earlier quoted context omitted.

Still wouldn't, why would you use your weakest finger in the bad sideways motion for such a frequent operation???

It's usually the weight of my whole hand. I touch type, but my hands are usually tilted to the exterior. So I hit keys like Enter, Capslock, Shift, with the side instead of the tip of my fingers. And I don't mind sliding my whole hands if I'm going to use it repeatedly.

Side vs tip doesn't come close to tipping the balance

And the last part is backwards - you don't need to use it repeatedly, there are much better alternatives, so you could just as well not mind not doing it

Re: Entering text in the terminal is complicated

#224
post #8

> some programs (the dash shell, cat, nc, git commit --interactive, etc) don’t support using arrow keys at all. The dash shell does in fact support an editing mode if compiled with libedit. Debian derivatives do not do so (likely for concerns of space). They very much should, as people who start with bash will have much to unlearn. The POSIX standard also specifies "set -o vi" as an optional extension. Every shell cl…

> They very much should, as people who start with bash will have much to unlearn. Dash on Debian is intended as a light POSIX sh to execute shell scripts. It isn't meant to be your login shell or for interactive use. It makes sense to keep the dependencies light in that context.

Bash can do a lot of damage to somebody who ends up needing to write POSIX shell scripts for dash.

I very much disagree that dash should be prepared without something that POSIX specifically mentions. This is bad from several perspectives.

Re: Entering text in the terminal is complicated

#225

> 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 end) Ctrl+LeftArrow and Ctrl+RightArrow also work with every readline-compatible shell and they are much more intuitive, especially if you are not used to terminal text editors. > it’s very inconsistent between programs Readline or emulations thereof are pretty common an…

those move by words, not to the end of the line

Re: Entering text in the terminal is complicated

#226
post #208
post #118

Earlier quoted context omitted.

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?

You’re right, I was wrong. Thank you for the gentle lesson. :)

happy to help!

Re: Entering text in the terminal is complicated

#227
The vi vs emacs thing permeates a lot of tools. I find it useful to map all tools to be consistent with one or the other. Personally I use vi. Unfortunately setting vi mode for readline has a few caveats, but I was able to work around all of them with the settings in:

https://www.pixelbeat.org/settings/.inputrc

Re: Entering text in the terminal is complicated

#228
post #141

Earlier quoted context omitted.

what would be ideal from my point of view for check boxes, dropdowns, and labels would be if they were a simultaneous alternative view of a command line, or rather a configuration line. an additional simultaneous view would provide a live preview of the result of that line. but you could still type and copy and paste the text interestingly this is not too far from my usual experience with the command line. i want to…

Trust me man, I know a few Concorde pilots and they sit in that cockpit and flip switches and the spin the controls such that the plane will glide like butter through a hurricane - while myself here is practically crash landing at every stop. There is the chronic issue with skilled linux users where they keep flexing how good the terminal is (and lets be honest: flexing their fluidity and dexterity with it too) while…

let's consider the possibility that people might disagree with you for reasons other than being dishonest. for example, i disagree with you because you're completely wrong on the facts, as i explained in my grandparent comment. unlike you, i'm not going to accuse you of dishonesty; possibly you are just ignorant (and aggressive) rather than mendacious

worse, though, you're using your ignorance to promote a vile ideology: the ideology of disempowering users in the name of ease of use. what you're advocating here is the strawman that people sometimes use to criticize guis: not powerful guis like excel, blender, solidworks, godot, photoshop, and autocad which empower users in ways that transcend the limitations of character-cell terminals, but glorified menu systems like mainstream android apps, which reduce users to passive consumers or machine operators

being a machine operator, manually telling a machine what to do over and over again, can be enjoyable and rewarding, as in riding a bicycle, driving a sports car, or your example of piloting a concorde (although you don't actually know any concorde pilots or you'd be aware there haven't been any concorde pilots in 20 years; interpreting you with extreme charity, perhaps you only meant this as a metaphorical explanation of what text-mode uis look like to you). but it must be voluntary, because it's an economically low-productivity activity; when you condemn people to be machine operators, you are condemning them to material poverty. bicycle messengers and taxi drivers do not have easy lives

computers permit people to automate machine operation, which enormously increases economic productivity. that's what we need. things like bash facilitate that, and things like android actively prevent it. good guis like godot's are in the first category, not the second

Re: Entering text in the terminal is complicated

#229

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

tcsh has a (maybe) unique command line editing feature: transpose characters. Ctrl-T It's vi mode is not as good as libedit's (IMHO) yet each shares the same author/maintainer. Though it's no longer the default, I believe tcsh may still be included with MacOS.

Ctrl+T does transpose-characters (and Alt+T transpose-words) in Emacs. I assume it's not a coincidencce, I see tcsh has `bindkey -e` / `-v` for Emacs/VI bindings. Same keys work in bash too (and anything else that uses readline) and fish too (independent editing implementation).
Post reply on HN