Unix Terminal Behaviors

Discussions center on quirks of Unix/Linux terminal emulators, TTY settings (e.g., stty commands), control sequences like CR/LF and ESC, readline controls, and historical terminal protocols such as VT100.

📉 Falling 0.4x DevOps & Infrastructure
2,626
Comments
20
Years Active
5
Top Authors
#8473
Topic ID

Activity Over Time

2007
1
2008
4
2009
13
2010
34
2011
56
2012
93
2013
79
2014
104
2015
85
2016
129
2017
191
2018
219
2019
151
2020
231
2021
212
2022
240
2023
250
2024
324
2025
198
2026
12

Keywords

EOF ESC HOME CRLF VT52 ANSI i.e GNU HID AFAIK terminal characters terminals emulator line input cr character output keyboard

Sample Comments

wdfx Nov 29, 2022 View on HN

For enough, but yes these are not to do with readline but terminal behaviour

zokier Nov 30, 2017 View on HN

Maybe in the same universe the overuse of VT control codes has led to command line to be actually line based.

jstanley Nov 12, 2023 View on HN

What terminal interprets "\r" as "clear the line"? I would have thought that is considered a bug.

kps Feb 8, 2022 View on HN

If for some reason you do want a terminal, you can run `stty -onlcr` to turn off the NL → CR LF conversion.

loloquwowndueo Dec 29, 2023 View on HN

Why, so your friends using vintage vt100 terminals can read your code without scrolling?

MatthiasPortzel Oct 20, 2023 View on HN

Is your terminal emulator waiting for a second input before sending Esc? That’s not a common behavior AFAIK.

MereInterest Apr 15, 2021 View on HN

Which terminal emulator do you use, and what happens if you paste something including newline characters?

oefrha Mar 8, 2024 View on HN

Back in the day? What’s the modern way to do it if not stty sane?

joouha May 16, 2024 View on HN

It's up to individual applications how they implement user input. All of this is entirely possible in modern terminal emulators - look at the micro text editor, for example.I guess most shells (bash, zsh, etc.) keep things "traditional" for backwards compatibility reasons.

ziftface Mar 12, 2021 View on HN

Can you elaborate what you mean by readline style controls? Looked it up but that didn't help.