wire / terminal-dec-private-mode / 1047
CSI ? 1047 h switches to the alternate screen buffer; CSI ? 1047 l switches back to the normal buffer AND clears the alternate buffer as it leaves. Unlike 47 it tidies the alt buffer on exit, but unlike 1049 it does not save/restore the cursor. Usually combined with 1048; 1049 is the all-in-one.
aka: alternate screen · alt buffer clear · DECSET 1047 · ?1047h / ?1047l
DEC-private-mode introducer: \x1b[? ESC [ ? (0x1B 0x5B 0x3F)
terminator (none): ST · BEL
| id | name | bytes (ST) | meaning |
|---|---|---|---|
| set | Enable (DECSET) | \x1b[?1047h | CSI ? 1047 h switches to the alternate screen buffer. |
| reset | Disable (DECRST) | \x1b[?1047l | CSI ? 1047 l switches back to the normal buffer and CLEARS the alternate buffer on the way out (unlike legacy mode 47). |
per-fact attribution:
agent: curl -H 'accept: application/json' wire.phall.io/terminal-dec-private-mode/1047
or /terminal-dec-private-mode/1047.json