<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gbos.git/usr/clear.c, branch master</title>
<subtitle>gbos - a tiny Unix-flavored OS for the Game Boy Color (kernel, shell, coreutils in C, RAM filesystem)</subtitle>
<id>https://git.sl0p.foo/gbos.git/atom/usr/clear.c?h=master</id>
<link rel='self' href='https://git.sl0p.foo/gbos.git/atom/usr/clear.c?h=master'/>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/gbos.git/'/>
<updated>2026-09-24T21:08:46Z</updated>
<entry>
<title>term: ESC[2J, so clear(1) can actually clear</title>
<updated>2026-09-24T21:08:46Z</updated>
<author>
<name>user</name>
<email>user@clank</email>
</author>
<published>2026-09-24T21:08:46Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/gbos.git/commit/?id=0ed3787ce6182a9198d67bb2b6ce556d21c7b1ad'/>
<id>urn:sha1:0ed3787ce6182a9198d67bb2b6ce556d21c7b1ad</id>
<content type='text'>
The terminal understood SGR and nothing else, so there was no way to erase the
screen - printing 18 newlines only scrolls the history up out of sight.
term_erase_all blanks the buffer, resets the colours, homes the cursor and
repaints; the CSI parser routes 'J' to it, and clear(1) is four putc calls.
</content>
</entry>
</feed>
