When the Shell Breaks Your Arrow Keys

2026-09-02

Link: https://emmajuettner.com/posts/when-the-shell-breaks-your-arrow-keys/

HN Discussion: 1 points, 0 comments

Every developer who has ever SSH'd into a minimal container, dropped into a recovery shell, or fired up sh instead of bash has hit the same infuriating wall: you press the up arrow expecting your last command, and instead the terminal spits out ^[[A. You press left to fix a typo and get ^[[D. Then you sheepishly retype the whole line.

This post looks like it actually explains why that happens — which is a rabbit hole that goes surprisingly deep. The short answer touches on:

This is exactly the kind of foundational plumbing knowledge that everyone touches but almost nobody sits down to actually learn. It's one of those articles where after reading it, a dozen unrelated frustrations across your career suddenly click into place — why docker exec -it alpine sh is miserable, why your Dockerfile's RUN steps behave oddly, why ssh into a stripped-down box feels time-warped to 1985.

Emma Juettner's blog has a track record of taking small "wait, why does that happen?" observations and unpacking them with genuine curiosity rather than the surface-level answer. This slipped through with a single upvote and no comments, which is a shame — it's the kind of post that should live in a bookmark folder titled "explain this to the junior next week."

Why it deserves more upvotes: A clear explanation of the shell/terminal/readline stack that turns a universal daily annoyance into a lasting piece of foundational Unix knowledge.

All newsletters