wire / terminal-dec-private-mode / 47

DECSET 47 — Alternate screen buffer (legacy)

CSI ? 47 h switches to the alternate screen buffer; CSI ? 47 l switches back to the normal buffer. This is the original alt-screen mode: unlike 1049 it does NOT save/restore the cursor or clear the alt buffer on entry, so it is largely superseded by 1047/1048/1049.

terminal-dec-private-mode kind control-sequence status de-facto verification verified tier B terminal-escape@1

aka: alternate screen · alt buffer · DECSET 47 · ?47h / ?47l · legacy alt screen

frame

DEC-private-mode introducer: \x1b[? ESC [ ? (0x1B 0x5B 0x3F)

terminator (none): ST · BEL

parameters / subcommands

idnamebytes (ST)meaning
set Enable (DECSET) \x1b[?47h CSI ? 47 h switches output to the alternate screen buffer (the normal buffer's contents are preserved but hidden). It does NOT save the cursor or clear the alt buffer.
reset Disable (DECRST) \x1b[?47l CSI ? 47 l switches back to the normal screen buffer, revealing its preserved contents.

gotchas


provenance

per-fact attribution:

see also

agent: curl -H 'accept: application/json' wire.phall.io/terminal-dec-private-mode/47 or /terminal-dec-private-mode/47.json