4 ms·
Typing "echo <ctrl-v><esc>c<return>" to fix a garbled Vt100 like terminal remains embedded in my brain from long ago. Despite simpler things like "stty sane" ex
by tyingq 6y ago
Typing "echo <ctrl-v><esc>c<return>" to fix a garbled Vt100 like terminal remains embedded in my brain from long ago. Despite simpler things like "stty sane" existing. I don't know if maybe I was an admin on some box with a wonky stty, or why that's in my brain.
- haecceity 6y agoIs <ctrl-v><esc> same as \x1b? Why are they same?
- tyingq 6y agoYes, 0x1b is an ascii <esc>. <ctrl-v> essentially means "insert the next key I press verbatim". So, like in Vim, <esc> would switch modes, unless you press <ctrl-v> first. Helpful if you're trying to insert a control character into a file, or echo a literal <ctrl-c> etc.
- haecceity 6y agoDoes the terminal emulator handle the ctrl-v or shell or somewhere in kernel?
- deleted 6y ago[deleted]
- jclulow 6y agoWhichever facility receives and processes the inbound keystrokes. In simple software that uses the terminal in canonical mode, the line discipline (usually in the kernel) handles the batching up of bytes into lines before passing them onto the software, and thus provides the line editing. In more complex software that puts the terminal into raw mode, it's then handled in that software; e.g., by libedit or readline or some bespoke terminal handling.
- VMG 6y agoI just type `reset` (maybe it's a zsh thing)
- tyingq 6y agoI don't remember, though I worked on a lot of oddball stuff. 3B2, Pyramid OSX, DGUX, etc.
- drran 6y agoWhy not just `clear` or `reset` terminal?
- tyingq 6y agoWish I could remember why not :). I know now, but the muscle memory sticks.