[Toybox] [PATCH] clear.c: Clear scrollback buffer on non-vte (gnome based) terminals

Mouse mouse at Rodents-Montreal.ORG
Tue Mar 5 13:31:50 PST 2024


> "\ec" is supported by linux ttys, and clears the screen in all
> terminals I tested.  And "\e[3J" has been supported by linux since
> 3.0, and clears the scrollback buffer in every terminal I've tested
> that has one, and is a NOP for terminals without one like linux tty's
> or st

What about terminals - and emulators - that don't do X3.64?  ESC does
nothing for me, so \e[3J would display as [3J.

Or do you simply not care about portability to that extent?

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		mouse at rodents-montreal.org
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


More information about the Toybox mailing list