340 karma · joined December 6, 2020
printf '%s\n' '/pam_smartcard\.so/a' 'auth sufficient pam_tid.so' . wq | sudo ex -s /etc/pam.d/sudovi is more than hjkl, and those four non-mnemonic keybindings make up for it by being extremely easy to press for QWERTY users. The vast majority of other commands are perfectly “reasonable” (easy to memorize and not dependent on any antiquated hardware) — append, backward word, change, delete, end of word, find letter, go to (OK, this one is just an arbitrary prefix), and so forth.
We deprecated ye and thou, but it’s the latter that “requires” y’all, because only thou (relative to us still having you) distinguishes the number of people.
Edit: put another way, “thou/thee is the one with number” meant that reintroducing them would create a number distinction.
Hadn’t thought about this before, but I think only window size needs to be synced (maybe baud rate and parity? I really have no idea how those would work)
> if you resize your local xterm, arguably the remote e.g. vi should get notified, but what if it's the remote process that changes the terminal dimensions, should your local xterm get resized as a result?
Huh, TIL processes other than the pty master (the terminal emulator usually) can change window size. Glad I checked my sources before writing off a comment …
In general, “smart” programs like bash or vi or fzf or readline configure the termios state so that the tty driver doesn’t handle any keys. This gives them more control. When they exit, they restore the termios to the original state, so that you can still backspace in dumb programs like cat and grep.
So you might have a dance like this when you run vi:
- bash restores its saved termios, so that whatever program it’s running starts with a blank slate
- vi saves the original termios
- vi switches the termios into “raw mode” (simplification)
- you edit text …
- vi switches back to the state it saved
- vi exits
- bash saves the termios state
- bash switches to raw mode
Your setup fails to distinguish keyboard interrupts (intended for the remote machine) and real SIGINTs generated by kill(1). It also uses the local termios(4) settings instead of the remote ones.
I vastly prefer this to the kind of “informational” video that’s designed to keep you watching a 10 minute video for the 10 second answer
language
Heh?